ITPEC IP October 2019 Question 48
In order to verify the quality of a program, which of the following is a testing technique that sets test cases by analyzing the internal structure of the program?
Explanation
White box test — test cases are designed by looking at the internal structure of the program: its logic, branches and paths.
A white box test designs its test cases from inside the program: the tester reads the source code and chooses inputs so that every statement, every branch or every condition is executed at least once (statement, branch and condition coverage). It is used mainly in unit testing by developers who know the code.
Answer (d)
Why not others:
- •(a) Regression test — re-runs existing tests after a change to confirm that parts which worked before are not broken; it is defined by when it is run, not by how cases are designed
- •(b) System test — checks the whole system from the outside against the system requirements, including performance
- •(c) Black box test — derives test cases from the specification (inputs and expected outputs), as in equivalence partitioning and boundary value analysis, without looking at the internal structure
Key rule: White box tests take their cases from the structure of the code and are measured by coverage; black box tests take them from the specification.
System Development Technology · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official IP past-paper collection or Report an issue.