Black box test: The functional design specifications of a known product can be tested to verify that each implemented function meets the requirements.
White Box testing: The internal working process of a known product can be tested to prove that each internal operation complies with the design specifications and that all internal components are inspected.
White-Box testing and black-box testing are based on the visibility of the software code, the test method used, and all the tests for the code itself can be seen as white-box testing, usually regardless of how the code is implemented, only the code can implement the function of testing can be regarded as black box test.
1. Black box test
Black box testing is also known as functional testing or data-driven testing, it is a known product should have the function of testing to detect whether each function can be used, in the test, the program as a non-open black pot, regardless of the program internal structure and internal characteristics of the case, the tester in the program Interface test, It only checks whether the program function is normally used in accordance with the requirements specification, whether the program can properly receive the input number saw and produce the correct output information, and maintain the integrity of external information (such as databases or files). The black box test method mainly includes equivalence class division, boundary value analysis, cause-fruit graph, error inference, etc., mainly used for software validation testing. The "black Box" method focuses on the external structure of the program, regardless of the internal logic structure, testing the software interface and software functions. The "black Box" method is an exhaustive input test, in which all possible inputs are used as test cases in order to detect all errors in the program in this way. In fact, there are an infinite number of test cases where people are not only testing all legitimate inputs, but also testing those that are illegal but possible.
2. White Box test
White box testing is also known as structural testing or logic-driven testing, it is aware of the internal work process, can be tested to determine whether the internal action of the product according to the specifications of the normal, according to the procedures within the structure of the test procedures, inspection procedures in each path is able to work according to predetermined requirements, regardless of its function, The main methods of white box testing are logic-driven, base-path test, etc., which are mainly used for software verification.
The White box method thoroughly understands the internal logic structure of the program and tests all logical paths. The "white Box" method is a poor lift path test. When using this scenario, the tester must examine the internal structure of the program, starting with the logic of the checker and drawing the test data. The number of independent paths through the program is astronomical. But even if each path is tested, there may still be errors. First, the exhaustive path test must not be able to find out that the program violates the design specification, that is, the program itself is a wrong program. Second, the exhaustive path test cannot detect errors in the program due to missing paths. Third, the exhaustive path test may not find some data-related errors.
Black box and white box