Code coverage defines the percentages of the methods tested by unit tests. Ideally it should be 100%. In this case all the lines in the code should be exercised. It does not tell about if all the possible scenarios are tested or not. With code coverage we try to execute every piece of code and test it. We can also use other coverage techniques to improve the quality of the tests. They are nicely written in this link. http://en.wikipedia.org/wiki/Code_coverage How many tests should we write then? Ideally all the tests should be written so that there is nothing left to break the code.
Wednesday, December 12, 2007
TDD Standards, Code Coverage
Posted by Goksel Misirli at Wednesday, December 12, 2007
Labels: TDD, TDD Standards, Unit testing
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment