Black box, white box and gray box

Source: Internet
Author: User

1.Black box testing
The black box test is also called a function test or data-driven test. It is a function of a known product. It is tested to check whether each function can be used normally.ProgramAs a dark basin that cannot be opened, the tester tests the program interface without considering the internal structure and features of the program, it only checks whether the program functions are normally used according to the requirements of the specification, and whether the program can properly receive the input saw to generate the correct output information, and maintain the integrity of external information (such as databases or files.

Black box testing methods include equivalence classification, edge value analysis, result graphs, and incorrect speculation. They are mainly used for software validation testing. The black box method focuses on the external structure of the program, does not consider the internal logic structure, and tests the software interface and software functions. The "black box" method is a testing of input. Only when all possible input is used as a test can all errors in the program be detected in this way. In fact, there are infinite number of tests. People should not only test all valid inputs, but also test those illegal but possible inputs.

2. White box testing
The white-box test is also called the structure test or logic-driven test. It knows the internal working process of the product and can be used to test whether the internal actions of the product are normal according to the specifications, test the program according to the internal structure of the program to check whether each channel in the program can work correctly according to the predefined requirements, regardless of its functions, the main methods of white box testing include logic-driven and baseline testing, which are mainly used for software verification.
" White Box " To fully understand the internal logic structure of the program and test all the logical paths. " White Box " The method is to test the exhaustive path. When using this scheme, the tester must check the internal structure of the program and obtain the test data starting from the logic of the program. The number of independent paths throughout the program is astronomical. However, even if each path is tested, errors may still occur. First, the exhaustive path test cannot identify that the program violates the design specifications, that is, the program itself is a wrong program. Second, the exhaustive path test cannot identify errors caused by missing paths in the program. Third, some data-related errors may not be found in the exhaustive path test.

3.Gray box test
The gray-box test is indeed between the two. It can be understood that the gray-box test focuses on the correctness of the output for the input, and also on the internal performance, however, this kind of attention is not as detailed and complete as it is in the white box. It only uses some characterization phenomena, events, and signs to determine the internal running status. Sometimes the output is correct, but it is actually an internal error. This is a lot of cases. If we use a white box test every time, the efficiency will be very low. Therefore, we need to adopt such a gray box method.

The gray-box test combines the elements of the white-box test box black-box test. It takes into account the user end, specific system knowledge and operating environment. It evaluates the design of application software in the collaborative environment of system components.

The gray-box test consists of methods and tools that are derived from the environment in which the internal knowledge box of the application interacts with it, it can be used for black box testing to improve test efficiency, error discovery, and error analysis efficiency.

The gray-box test involves input and output,CodeAnd program operations and other information design tests that are usually outside the tester's field of view.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.