Loading ...
Sorry, an error occurred while loading the content.
 

tutorial: measure coverage to improve your unit tests

Expand Messages
  • Brendan Humphreys <brendan_humphreys@yah
    In the article Test Infected (http://junit.sourceforge.net/doc/testinfected/testing.htm), an example library for handling Money is used to demonstrate the
    Message 1 of 1 , Jan 1, 2003
      In the article "Test Infected"
      (http://junit.sourceforge.net/doc/testinfected/testing.htm), an
      example library for handling Money is used to demonstrate the art of
      Unit Testing with JUnit. The source to the Money library also ships
      as an example with the standard JUnit distribution. The 22 tests
      developed for the Money Library test most of the code in the library,
      but not all of it. Which parts of the library weren't tested? How
      would you go about finding out?

      Coverage Analysis lets you see which parts of your application code
      are being tested by your unit tests, and which parts aren't being
      tested. You can then use this info to improve your tests and catch
      bugs.

      The tutorial at http://www.thecortex.net/clover/tutorial/index.html
      shows you how to measure the coverage of the Money Library tests, and
      then improve the tests based on the results.

      Regards,
      -Brendan
      http://www.thecortex.net/clover
    Your message has been successfully submitted and would be delivered to recipients shortly.