Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Collation of basic knowledge of software testing III-white box testing

Shulou Source: shulou.com Published: 2022-06-03 07:27:53 09月16日 Update

White-box testing is another main method of software testing, also known as structural testing, logic-driven testing or testing of the program itself. it focuses on the internal structure and algorithm of the program, and usually does not care about function and performance indicators. The white-box testing of the software is a careful examination of the process details of the software. This method treats the test object as an open box, which allows white-box testers to design or select test cases to test all logical paths of the program by using logic knots and related information within the program. Check the status of the program at different points to determine whether the actual state is consistent with the expected state. White-box testing is based on the analysis of the control structure and processing process in the source code to check whether the internal processing of the program is correct, including exception handling, statement structure, analysis, loop structure and so on. A lot of control software should also consider whether there is any residual code, because when the program is running, it may enter the code and can no longer be executed normally (such as entering a dead loop, the program can never be terminated). This kind of testing requires testers to have a high understanding and coding ability of the program, to understand the architecture of the program, specific requirements, and some programming skills, and to be able to check some program specifications, pointers, variables, arrays, etc., so that the problem is exposed in the early stage.

The main methods of white box testing include:

Statement judgment: enables each statement in the program to be executed at least once.

Judgment coverage: make each judgment in the program true or false at least once.

Conditional coverage: enable each condition in the judgment to obtain a variety of possible results.

Judgment / conditional coverage: both judgment coverage and conditional coverage are satisfied.

Conditional combination coverage: so that all possible combinations of conditions in each judgment appear at least once.

Tags: Tests programs conditions structures software states checks methods statements logic processing people code capabilities processes problems loops controls combinations software testing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB macOS Xiaomi Microsoft