How to understand black box testing and white box testing? what is the relationship between the two

According to the testing techniques used, software testing can be divided into black box testing and white box testing.

(1) Black box testing

Black-box testing is to treat the software (program) as a black box with input and output. It regards the program as a mapping from input domain to output domain. As long as the input data can output the expected result, it does not need to care about the inside of the program. How to achieve it, as shown in Figure 1.

Black box testing flow chart

Figure 1 Black box test

(2) White box testing

White box testing is also called transparent box testing. It means that testers understand the logical structure, path and running process of the software program, and obtain results according to the execution path of the program during the test. White-box testing is to treat the software (program) as a transparent box, and testers clearly know every step of the process from input to output, as shown in Figure 2.

white box testing

Figure 2 White box testing

Compared with black-box testing, white-box testing has higher requirements for testers. It requires testers to have certain programming skills and be familiar with various scripting languages. However, in software companies, black-box testing and white-box testing are not clearly defined. When testing a piece of software, black-box testing and white-box testing are often combined to conduct a complete and comprehensive test of the software.

Guess you like

Origin blog.csdn.net/cz_00001/article/details/132169724