Path testing is a well established technique for selecting test cases. A path is a set of logically contiguous statements that is executed when a specific input set is used, such as the following:
S1; if(cond1) S2 else S3
There are the paths S1, S2 and S1, S3. Other control structures introduce new paths and may result in an indeterminate number of paths or, worse still, an infinite number of paths.
Coverage is measured by computing the percentage of paths that have been exercised by a test case. Executing 100% of the paths in a program provides complete code coverage although it may not detect defects related to the computation environment. Of course, this is difficult to achieve when there are an infinite ...