プログラムの品質を検証するために, プログラム内部のプログラム構造を分析し, テストケースを設定するテスト手法はどれか。
平成24年度 秋期 ITパスポート試験 問46
This question's explanation and your answers so far.
問 46
Incorrectア
Regression testing checks, after a program has been modified or has had functions added, that the change has not broken existing functions that used to work correctly. It is a classification by the purpose of a test (when and why it is run), not a term for a technique that designs test cases by analyzing the internal structure. Regression testing itself can be carried out in either a white-box or a black-box way, so it cannot be the answer to this question.
Incorrectイ
System testing is a test phase carried out after unit testing and integration testing, in which the development side verifies that the system as a whole satisfies the functions, performance, and reliability laid down in the requirements definition. This is the name of a stage (phase) at which testing is performed, not a technique that shows how test cases are created. It also has a strong character of checking the whole system from its external behavior, so it does not fit the question's description of analyzing the internal logical structure.
Incorrectウ
Black-box testing deliberately does not look at the internal structure of the program; it designs test cases by focusing only on the external specification (what output should be returned for what input). Because the program is treated as a box whose inside cannot be seen, its representative techniques are equivalence partitioning and boundary value analysis. This is exactly the opposite idea from the analyzing the internal structure stated in the question, and it should be learned as the counterpart concept to white-box testing.
- エ
正解 The correct answer is エ, white-box testing. White-box testing is a technique in which you actually read and analyze the inside of a program (its internal logical structure: statements, conditional branches, and processing paths) and design test cases based on that structure. As the metaphor of a box you can see through suggests (white = a transparent box), it assumes that the tester knows the internal structure. Typical coverage criteria include statement coverage, which executes every statement at least once, and branch (decision) coverage, which takes both the true and the false side of every branch; input data is chosen so that these criteria are satisfied. The wording of the question, analyzing the internal structure of the program and setting test cases, matches this definition exactly, so エ is correct.
- White-box testing focuses on the internal logical structure (statements, branches, paths) and measures thoroughness with statement coverage and branch (decision) coverage. Black-box testing, in contrast, focuses only on the external specification (inputs and outputs) and creates cases with equivalence partitioning and boundary value analysis. Learn these two together as a pair of opposing concepts.
- Testing terms are classified along two different axes. White-box / black-box belong to the axis of how test cases are created (the technique); unit testing, integration testing, system testing, and operational testing belong to the axis of which stage of the development process the test sits at; and regression testing belongs to the axis of why the test is done (its purpose). Working out which axis a question is asking about lets you narrow down the choices quickly.