Why is testing divided into white box, black box, unit, and integration testing?

1. Why are there so many concepts of testing?

A software project is like a complex car with many parts. After each part is produced, it is necessary to test whether there are quality problems in the parts. After the parts make up the complex car, we also test the car. For example, the well-known China Insurance Research Institute tests brakes, airbags, and collision avoidance. When customers buy cars from 4S stores, they need to bring someone who knows cars to help inspect the finished car. This is actually a kind of test. The same is true for software. In addition to unit testing of test parts, there are also integration testing, confirmation testing, system testing, acceptance testing, etc., see the picture below:

2. Popularization of various testing concepts

Unit testing is the testing work for checking the correctness of the smallest unit in software design - the program module. A unit refers to a function or a class in software code, and in graphical software, a unit generally refers to a window or a menu.

When all relevant units in a software project are developed and unit tested, it can only ensure that each independent unit has no problems, but when multiple units are integrated into a complete function, quality verification is required again. This step is the integration test.

Integration testing is also called assembly testing, usually on the basis of unit testing, all program modules are tested in an orderly and incremental manner. Focus on testing the interface part of different modules.

Both unit testing and integration testing are divided according to different testing phases. The first thing a project needs to do is unit testing, and after unit testing is completed, integration testing is performed. After the integration test is completed, there are system tests and acceptance tests, etc. to complete the final acceptance and delivery of the software project.

In the specific test execution process, it is divided into whether to check the source code or not. The test method without checking the source code is black-box testing , and the testing method of checking the source code is white-box testing .

Black box testing means that the internal structure and internal characteristics of the program are not considered at all during the test, and the functional requirements of the test software are focused on, and only the input data and output data of the software are concerned.

White box testing refers to opening the source code of the software to study the program structure and specific programming implementation methods inside.

In addition to black-box testing and white-box testing, there is also gray-box testing in between .

Gray box testing:  It is a test between white box testing and black box testing. Gray box testing is mostly used in the integration testing phase, not only focusing on the correctness of output and input, but also paying attention to the internal situation of the program.

Software test engineers do black box testing most of the time. In some special scenarios, gray-box testing is also required, but white-box testing requires relatively little knowledge of programming, so software test engineers are relatively less involved.


If the article is helpful to you, remember to like, bookmark, and add attention. I will share some dry goods from time to time...

END Supporting Learning Resources Sharing

Finally:  In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free 【保证100%免费】

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

insert image description here

How to obtain the full set of information:

Guess you like

Origin blog.csdn.net/m0_58026506/article/details/131207825