CS447 Lecture Notes - Lecture 1: Integration Testing, Finite-State Machine, Compile Time
Document Summary
Let"s put what we saw last time into practice. Recall the four steps: identify predicates, compute reachability, calculate conditions for determination, and nd needed variable values. For programs, extract conditions from branches (if, while, etc: many conditions have only 1 clause, so predicate coverage su ces to cover all interesting cases. Ensuring appropriate values is easier in unit testing than in integration testing, since you have more control over the inputs. Potential complications include nondeterminism, causing time-sensitivity, or input/output. The canonical example for logic coverage is trityp, as seen in the book. I looked through source code on my hard disk and found the following excerpt from fontconfig, a font management library for unix systems. It is written in c, which tends to have more complicated predicates than java. 2 fcconfiguptodate ( fcconf ig c o n f i g ) The rst three predicates are easy to reach.