Software Test Summary (7)

Source: Internet
Author: User

In the previous section, we talked about the equivalent classification in the black box test. This section continues to summarize another classic testing method, boundary value analysis. In fact, boundary value testing is not a dedicated black box test, the Boundary Value test is also used in the white box test.In fact, the boundary value test is a variety of boundary values of the test program. The Boundary Value test is a promotion of the equivalence classification. In actual tests, many defects can be tested when testing the boundary of the program, therefore, the two methods must be used in combination to better meet the testing requirements of the program. The Boundary Value test is divided into two parts:
You may be able to understand the input test, but it may be difficult to understand the output test. If there are more reasons, let's give a few examples to illustrate the truth, let's take a look at the following examples.
Question 1: A supermarket sells a certain brand of high-grade boxed yogurt and is now carrying out promotions during the New Year's Day. The supermarket will perform promotions based on the amount purchased by the customer. The specific promotion plans are as follows:

 

Analysis: the boundary value we can consider is, because the boundary condition has been given in detail in the problem. In fact, we should also consider the boundary value, 31. The test cases are as follows:
Question 2: the calculation method of the life insurance premiums of an insurance company is as follows: 1. Insurance = amount of insurance * Insurance 2. the insurance rate does not need to be used based on the age, gender, marital status, or number of dependents of the policyholder. It is reflected that the corresponding points are set differently under different conditions, the insurance rate above is 0.6%, and the insurance rate below is 0.1. The specific rules are as follows:
 

 

Analysis: In this example, there are many boundary values to consider. Not only the input boundary, but also the output boundary. The input boundary can be divided into age boundary and dependents boundary, and points can be used as output boundary.
Age boundary: 0 1 19 20 39 40 59 60 90 100 infinity Dependents: 0 1 6 7 9 10 infinity Points: 9 10 11
The following is the principle of Border Value Analysis summarized by a teacher: 1. If the input condition specifies the value range, take the value that has just reached the range and the value that has just exceeded the range as the test input data. 2. If the input condition specifies the number of values, use the maximum number, minimum number and one more than the maximum number, and one less than the minimum number as the test data. 3. If the program specification shows that the input or output fields are ordered sets, the first and last elements in the set should be selected as the test case. 4. If an internal data structure is used in the program, select the value at the boundary of the internal data structure as the test case.
Of course there are many other principles. The most fundamental theory of boundary value analysis is that it is just greater than the maximum value or just less than the minimum value. Grasping this basic point and classifying problems one by one is the basic starting point for doing well in boundary value testing.
This section ends. The next section will summarize the incorrect inference method. Stay tuned! Thank you!

Related Article

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.