White box covered in six common: statement coverage, decision coverage, condition coverage determination / coverage condition, a combination of coverage and path coverage
- statement covering
a definition:
Program each statement can be executed at least once |
Second, characteristics:
1, a statement is executed once for each program |
2, the program execution logic low coverage, are the weakest cover |
3, no combination of input values and the input value determining branch test program |
Bifurcation 4, no test program |
5, no need to test different paths of program execution |
Third, the program flow
five, statement coverage case design
Path ace to complete statement coverage
Test Case | Coverage Path | expected outcome |
---|---|---|
A=2,B=0,X=3 | a-c-e | X=2.5 |