Joke Collection Website - Talk about mood - What's the difference between black box test and white box test?

What's the difference between black box test and white box test?

Black-box test: Knowing the functional design specifications of the product, we can test to prove whether each realized function meets the requirements.

100 box test: understand the internal working process of the product, and through the test, it can be proved whether the internal operations meet the requirements of design specifications and whether it is necessary to check all internal components.

Black-box testing of software means that testing should be carried out on the interface of software. In this method, the test object is regarded as a black box, and the tester completely ignores the internal logical structure and internal characteristics of the program, and only checks whether the function of the program conforms to its functional description according to the requirements of the program. Therefore, black-box testing is also called functional testing or black-box testing. Black box testing is mainly to find the following types of errors:

1. Is there an incorrect or missing function?

2. On the interface, can the input be accepted correctly? Can you output the correct results?

3. Is there any data structure error or external information access error?

4. Whether the performance can meet the requirements.

5. Are there any initialization or termination errors?

White-box testing of software is a detailed examination of software process details. This method regards the test object as an open box, allowing testers to use the internal logical structure and related information of the program to design or select test cases and test all logical paths of the program. By checking the program state at different points, it is determined whether the actual state is consistent with the expected state. Therefore, white-box testing is also called structural testing or logic-driven testing. White-box testing is mainly to check the program modules as follows:

1. Test all independent execution paths of the program module at least once.

2. For all logical judgments, "true" and "false" can be tested at least once.

3. Execute the loop body within the loop boundary and the running boundary.

4. Test the validity of the internal data structure, and so on.

The above facts show that there is a fatal flaw in software testing, that is, the testing is not comprehensive and complete. Since any program can only be tested for a limited number of times, it cannot be said that the program is error-free without finding errors.