ITPEC IP April 2022 Question 46
Mr. A, a developer, is analyzing and verifying the internal structure of a program in order to determine whether input data is processed as intended. Which of the following is the test that Mr. A is currently conducting?
Explanation
White box test — examining the internal structure of a program (its logic, branches and paths) to check that input data is processed as intended.
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, as Mr. A does here.
Answer (d)
Why not others:
- •(a) System test — checks the whole system from the outside against the system requirements, including performance
- •(b) Top-down test — an order for integration testing that starts from the upper modules and uses stubs for the lower ones; it is about the order of combining modules, not looking inside one
- •(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.