Prev | Testing and Code Coverage | Next |
A statement is covered if it is executed
Statement != line of code
Sequences of statements
Weakest form of coverage
Still not easy to get 100% statement coverage
Error conditions, rarely occurring events
if ($param > 20) { die "This should never happen!"; }
Nice to mark code that shouldn't be executed
Synonyms: statement execution, line, block, basic block or segment coverage
Slide 16 | YAPC::Europe::2002 | Copyright © 2002 Paul Johnson |