The Art of software Testing: Boundary value analysis

Source: Internet
Author: User

Boundary value Analysis: the so-called boundary condition refers to those states in the input and output equivalence classes that happen to be at or above the boundary, or below the boundary. The important difference between the boundary value analysis method and the equivalence partition is that the boundary value analysis is in the state of equivalence dividing boundary or near the boundary, and one of the weaknesses of boundary value analysis and equivalence partitioning is that the combination of input conditions is not analyzed. They are different in two ways:

    1. Unlike selecting any element from an equivalence class as a delegate, boundary value analysis requires selecting one or more elements so that each boundary of an equivalence class is tested once.
    2. Instead of focusing on input conditions (input space), you also need to consider designing test cases from the result space (output equivalence class).

A general guide for designing test cases with the boundary value analysis method:

    1. If the input criteria specify a range of input values, the test case should be designed for the bounds of the scope, and invalid input test cases should be designed for cases that have just crossed out. Example: If the valid range of input values is -1.0~+1.0, then the test case should be designed for 1.0, +1.0,-1.001, +1.001;
    2. If the input criteria specify the number of input values, then the test case should be designed for the minimum number of input values, the maximum number of input values, and one less than the minimum quantity, which is more than the maximum number. For example, if an input file can hold 1~255 records, the test case should be designed according to 0, 1, 255, 256 records;
    3. Apply Guide 1 to each output condition to check the bounds of the result space. Because the bounds of the input range do not always represent the bounds of the output range (as in the case of trigonometric sin). Similarly, it is unlikely that the results will always produce more than the output range, but this possibility should be considered in any case;
    4. For each output condition, apply Guide 2, if an information retrieval system displays a summary of the most relevant information based on the input request, and the number of summaries never exceeds 4, the test case should be written to show 0, 1, and 4 summaries, and the test case should be designed to cause the program to display 5 summaries incorrectly;
    5. If the input or output of a program is an ordered sequence (for example, sequential files, linear lists, or tables), special attention should be paid to the first and last elements of the sequence;
    6. Also, play with intelligence to find other boundary conditions.

The Art of software Testing: Boundary value analysis

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.