Comprehension and planning application of dialogue box testing

Source: Internet
Author: User

As the project software is almost complete, white-box testing is starting to work.
White-Box testing is a test method used to discover certain errors in the software. It is divided into 2 kinds of logic covering and control structure test.

For logical overrides, there are statement overlays, decision overrides, conditional overrides, decision/condition overrides, conditional combination overrides, point overlays, edge overlays, and path coverage of eight.
Statement overlay: The simplest overlay requires that the program's statements run all over again. For example, there are statements: if (a<10) a=a*2; the condition in normal operation may not be satisfied and skipped, and in the process of statement coverage, we must let its value be true, that is, each statement runs. Doing so can detect the correctness of all statements. But its shortcomings are obvious, if the judgment statement is wrong, its value is always true, then this coverage will not be detected.
Decision coverage: In order to compensate for the lack of coverage of the statement, there is a decision covering. On the basis of the statement overlay, he lets each judgment statement take its possible value. Or just the example, to give 2 sets of data, a group let a<10, a group let a>=10 to test the correctness of the sentence. Obviously, the decision coverage is higher than the statement coverage, but its disadvantage is that the degree of coverage of the program logic is not high.
Conditional override: The conditional override means that each condition is taken to the possible result. It feels a bit like a judgment overlay. (Here I'm not very clear about the difference between conditional coverage and decision coverage.) )
Decision/Conditional override: This is a combination of a decision overlay and a conditional overlay, so it has multiple sets of test data. Its coverage of the program logic is the highest, but for the complex conditions, it is difficult to find all the tests.
Conditional combination overrides: That is, the conditional truth values in the program are arranged together, each combination is tested. This can identify errors that are logically related to the condition.
Point overlay, Edge overlay, and path overlay: Just let the sample of the test go through all the points, edges, or paths of its flow graph. For the side overlay, I think it is actually let the program run all at once. Because the side cover needs to go to all sides, so for the selected program, it can not run all. For example, if there is a statement if (A&LT;10) A++;else a--, run only one of them. Therefore, can run side coverage, only there is no more than one program. (I don't know if this understanding is right.) )

For the control structure test, there are three kinds: basic path test, condition test and cyclic test.
Basic path test: According to the complexity of the program's environment, find all its independent paths and test them all. To be blunt, it is actually testing all the paths that the program may run. This test is only suitable for programs where all independent paths can be tested in a separate way. (The textbook example shows that 2 of these paths cannot be tested independently.) )
Condition test: A conditional test can check the logical conditions contained in a program module. These include the use of conditions, which are divided into simple conditions and compound conditions. Complex conditions are complicated, the complexity of testing is high, and the test example is difficult to set up. (For compounding conditions, I'm still a little confused.) )
Cyclic testing: Is the test of the loop, which has a simple loop, nested loops, and a threaded loop. There are methods for converting nested and threaded to simple loops.

For a white box test plan use:
Our project is communication software, is to achieve two in the LAN host real-time dialogue. So its logic overrides should be overridden with conditional combinations. There are few samples required for testing because of the lack of conditions to judge. Moreover, the test method of the maximum coverage of the program logic is the conditional combination overlay. For the condition that should be judged, whether the local database is written (so that the chat record can be viewed) and whether the word count is met (the number of words is specified). ), the login is correct. There are only 8 types of test examples. The rest of the judgment has not been added yet.
For the cyclic testing, we need to pay attention to, because our software is always looking at the server database is updated, this cycle is the basis of the software, if the loop error, then the software error.

The above is my understanding of the dialogue box test.

Comprehension and planning application of dialogue box testing

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.