Eighth Week assignment: White box test and black box test

Source: Internet
Author: User

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.

Black-Box testing is also known as functional or data-driven testing, and it is tested to see if each feature is working properly. In the test ground, the program as a black box can not be opened, regardless of the internal structure of the program and internal characteristics of the case, in the program interface testing, it only checks whether the program function in accordance with the requirements of the specification of the normal use, the program can properly receive input data and produce the correct output information. Black box testing focuses on the external structure of the program, regardless of the internal logical structure, mainly for the software interface and software function testing. The black box test is based on the user's point of view, from the input data and output data corresponding to the relationship between the test. Obviously, if the external features themselves have problems or specifications are wrong, the use of ink cartridges test method is not found. The black box test is mainly to find the following types of errors:

1. Are there any features that are incorrect or missing?

2, on the interface, the input can be correctly accepted? Can I output the correct results?

3. Are there any data structure errors or external information (such as data file) access errors?

4, performance can meet the requirements?

5. Are there any initialization or termination errors?

White box testing is also called structural testing or logic-driven testing, it is in accordance with the internal structure of the program testing procedures, through testing to determine whether the internal action of the product according to the specifications of the design specification of the normal conduct, inspection procedures in each path can be as scheduled to work correctly. This method is to think of the test object as an open box, the tester designs or selects the test case according to the internal logical structure of the program, tests all the logical paths of the program, and determines whether the actual state is consistent with the expected state by checking the state of the program at different points. White box testing is mainly to the program module to check the following:

1, test all the independent execution path of the program module at least once.

2, to all the logical judgment, take "true" and take "false" two cases can be measured at least once.

3. The loop body is executed within the boundaries of the loop and the boundary of the operation.

4, test the effectiveness of internal data structure, and so on.

The above facts show that software testing has a fatal flaw, that is, the test is incomplete, not thorough. Since any program can only perform a limited number of tests (in terms of the large amount of exhaustive), it cannot be stated that there are no errors in the program when no errors are found.

Two example analysis links are included:

Example Analysis of black box test method:

http://www.test-edu.net/softwareinfo.asp?id=1001&nid=5497

White Box Test example--Logic overlay test:

http://www.test-edu.net/softwareinfo.asp?id=1001&nid=5182

Eighth Week assignment: White box test and black box test

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.