White box testing is to design test cases based on the "internal logic" of the program. White-box testing is to conduct coverage testing of the logical paths in the software by checking the internal logical structure of the software; setting up checkpoints in different places of the program to check the status of the program to determine whether the actual running status is consistent with the expected status.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
White box testing is to design test cases based on the "internal logic" of the program, while black box testing is to design test cases based on the "specifications" of the software.
White box testing is also called structural testing, transparent box testing, logic-driven testing or code-based testing. White box testing is a test case design method. The box refers to the software being tested. White box means that the box is visible, that is, it is clear what is inside the box and how it works. The "white box" method fully understands the internal logical structure of the program and tests all logical paths. The "white box" method is exhaustive path testing. When using this solution, the tester must examine the internal structure of the program and start by examining the logic of the program to derive test data. The number of independent paths through a program is astronomical.
White box testing performs coverage testing on the logical paths in the software by checking the internal logical structure of the software. Set up checkpoints at different places in the program to check the status of the program to determine whether the actual running status is consistent with the expected status.
The coverage standards of the white box testing method include logical coverage, loop coverage and basic path testing. Logic coverage includes statement coverage, decision coverage, condition coverage, decision/condition coverage, condition combination coverage and path coverage. The ability of the six coverage standards to detect errors changes from weak to strong:
1. Statement coverage Each statement is executed at least once.
2. The decision covers each branch of each decision and is executed at least once.
3. Condition coverage Each condition of each judgment should take various possible values.
4. Judgment/condition coverage meets the judgment coverage condition coverage at the same time.
5. Condition combinations cover each combination of conditions in each judgment and appear at least once.
6. Path coverage enables every possible path in the program to be executed at least once.
Category:
White box testing methods are generally divided into two categories: static analysis methods and dynamic analysis methods.
Static analysis is a technique for testing without executing the program. The key function of static analysis is to check whether the representation and description of the software are consistent and whether there are conflicts or ambiguities.
Dynamic analysis is the analysis of the behavior of a software system before, during and after its execution in a simulated or real environment. Dynamic analysis involves the formal execution of a program in a controlled environment with specific expected results. It shows whether a system is correct or incorrect in its checked state. Among dynamic analysis techniques, the most important techniques are path and branch testing.
For more knowledge about computer programming, please visit: Programming Video! !
The above is the detailed content of White box testing is to design test cases based on the program. For more information, please follow other related articles on the PHP Chinese website!