Page 205 - DCAP405_SOFTWARE_ENGINEERING
P. 205
Software Engineering
Notes
!
Caution Effectively combining random testing with other testing techniques may yield
more powerful and cost-effective testing strategies.
12.1.1 White-box Testing Techniques
White-box testing, sometimes called glass-box testing is a test case design method that uses the
control structure of the procedural design to derive test cases.
Using white-box testing methods, the software engineer can derive test cases that:
1. guarantee that all independent paths within a module have been exercised at least once
2. exercise all logical decisions on their true and false sides
3. execute all loops at their boundaries and within their operational bounds, and
4. exercise internal data structures to ensure their validity.
Basis Path Testing
Basis path testing is a white-box testing technique first proposed by Tom McCabe. The basis
path method enables the test case designer to derive a logical complexity measure of a procedural
design and use this measure as a guide for defining a basis set of execution paths. Test cases
derived to exercise the basis set are guaranteed to execute every statement in the program at
least one time during testing.
Flow Graph Notation
The flow graph depicts logical control flow which is used to depict the program control structure.
Figure 12.1
The structure constructs in flow graph form:
Case
Sequence If While Until
Where each circle represents one or more non-branching PDL or source code statements
Referring to the figure, each circle, called a flow graph node, represents one or more procedural
statements. A sequence of process boxes and a decision diamond can map into a single node. The
arrows on the flow graph, called edges or links, represent flow of control and are analogous to
flowchart arrows. An edge must terminate at a node, even if the node does not represent any
procedural statements (e.g., see the symbol for the if-then-else construct). Areas bounded by
edges and nodes are called regions. When counting regions, we include the area outside the
graph as a region.
198 LOVELY PROFESSIONAL UNIVERSITY