This blog goes on to introduce the white box test, in the absence of specific contact with the white box test before, always feel that he is very mysterious, very complex. I'm sure everyone will feel that way.
Let's open the box today and dissect the white box test.
White box test
The white box test is also called the structural test or the logic drive test, it is to know the product internal work process, can pass the test to check whether the product internal action according to the specification
The specifications of the instructions are normally carried out, according to the internal structure of the program testing procedures, testing procedures in each of the paths are able to work according to the predetermined requirements, and
Regardless of its function, the main methods of white-box testing are logic-driven, base-road testing, mainly for software verification.
The White box method fully understands the internal logic structure of the program and tests all logical paths. Testers must check the internal structure of the program, from the check program's
Start with the logic and draw the test data.
White Box test method
There are code check method, static structure analysis method, static quality measure method, logic coverage method, basic path test method, domain test, symbol test, path cover
Cover and program variation.
The logical coverage includes: statement coverage, decision coverage, conditional coverage, decision condition coverage, conditional combination coverage and path coverage.
Six types of coverage criteria for discovering errors vary from weak to strong:
1. Statements overwrite each statement at least once.
2. Determine that each branch that covers each decision is executed at least once.
3. Conditions covering each of the conditions for each decision should be taken to a variety of possible values.
4. The decision/condition coverage meets the decision coverage condition.
5. A combination of conditions that covers each of the conditions in each decision appears at least once.
6. Path overrides enable every possible path in the program to be executed at least once.
Guide Map Display
Black and white box contrast
Grey Box test
Gray box test, is between the white box test and black box test, you can understand, gray box test focus on the output of the correctness of the input, but also off
Note the internal performance, but this concern is not as detailed and complete as the white box, only through a number of representational phenomena, events, signs to determine the internal operation of the
State, sometimes the output is correct, but the internal is actually wrong, this situation is very much, if every time through the white box test to operate, the efficiency will be very
Low, so the need to take such a gray-box method.
Through the introduction of the two blog, I believe that we have a certain understanding of the basic methods of software testing, to know the black box, white box, gray box between the difference and
Contact, and how to choose. In combination with the actual situation, we Itoo project is black box white box are used, but because the cost of white box is expensive, to do very
Meticulous relatively difficult, so the white box test mainly arranged code to check the method and unit test, aimed at improving the coding level, I hope you have a lot of
With.