Black box test and white box test:

Source: Internet
Author: User
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. Program It can be seen as an unopened black basin, without considering the internal structure and features of the program,

The tester tests the program interface. It only checks whether the program function is properly 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.
White box test:
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. The "white box" method provides a comprehensive understanding of the internal logic structure of the program and tests all logical paths. The "white box" 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.

Black box test and white box test

Any Engineering Product (note any engineering product) can be tested using either of the following two methods.
Black box testing: the functional design specifications of products are known. You can perform tests to verify that each implemented function meets the requirements.
White-box testing: it is known that the internal working process of the product can be tested to verify whether each internal operation meets the design specifications and whether all internal components are inspected.

The software black box testing means that the testing should be performed at the software interface. In this way, the test object is regarded as a black box. The tester does not consider the logical structure and internal characteristics of the program, but only according to the specification of the program, check whether the function of the program complies with its function description. Therefore, black box testing is also called function testing or data-driven testing. Black box testing mainly aims to discover the following types of errors:

1. Are there any incorrect or missing functions?
2. Is the input correct on the Interface accepted? Can I output the correct result?
3. Are there any data structure errors or external information (such as data files) access errors?
4. Can the performance meet the requirements?
5. Are there any initialization or termination errors?

The white box test of the software is to carefully check the procedural details of the software. In this way, the test object is regarded as an open box, which allows the tester to design or select a test case to test all the logical paths of the program using the logical structure and related information in the program. Check the program status at different points to check whether the actual status is consistent with the expected status. Therefore, a white-box test is also called a structure test or a logic-driven test. The white box test mainly aims to check the program module as follows:

1. test all independent execution paths of the program module at least once.
2. You can test all logical judgments in either case of true or false.
3. Execute the loop body within the loop boundary and running boundary.
4. test the effectiveness of the internal data structure.

The above facts show that software testing has a fatal defect, that is, the test is incomplete and not thorough. As any program can only perform a limited number of tests (relative to a large number of poor examples), when no error is found, it cannot indicate that there is no error in the program.

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.