XpdWiki

FrontPage
RecentChanges
XtC
FindPage
PageIndex
XpApprentices

Set your name in
UserPreferences

Edit this page

Referenced by
...nobody




JSPWiki v2.0.52


CodeCoverageVersusPathCoverage


I am playing with trying to generate (retrofitting to existing code) JUnit suite skeletons (more as a way of teaching myself parsing ASTs than creating something amazing) and am trying to decide how to proceed. I am caught between identifying and testing unique paths through a method versus just making sure the code is covered by at least one test (or is there a magical middle ground?).

I would appreciate your comments - I am sure generating test skeletons for every possible path through a method would get big and ugly (exponential with nested conditionals etc) - but I feel uneasy about a situation where one test doesn't enter any conditional segments - and one test does (simple example) but you lose testing the impact of previous activities in combination. Argh. -- DanPollitt


There's a nice article about the different kinds of coverage here: http://www.testing.com/writings/coverage-terminology.html. You should probably also take a look at Ivan's JesTer tool for MutationTesting. Ivan's the one who taught me that just because you have 100% coverage (of whatever type) doesn't mean that your tests are any good. If you don't test the expected ranges of valid and invalid data then you end up with code that's got a 100% coverage but which blows up when given real-world input. --AdewaleOshineye


Edit this page   More info...   Attach file...
This page last changed on 07-May-2004 12:42:07 BST by unknown.