Black box testing (1) ----- border value testing

Source: Internet
Author: User
Tags failover
Boundary Value Analysis is a frequently-used black box testing method that supplements the equivalence class division method. The so-called Boundary Value refers to the input and output equivalence classes, some specific situations that are slightly higher than the maximum value or slightly lower than the minimum value. The Boundary Value Analysis Steps include determining the boundary, and selecting a trial use case. I. Basic Principles:
  • The error is more likely to happen near the extreme values of input variables.
  • Failure is rarely caused by the same occurrence of two or more defects.
  • Min, min +, nom, Max-, Max.
Ii. single defect and multi-defect if:
  • If a single defect is critical to boundary value analysis. If a single defect refers to "Failure is rarely caused by two or more defects at the same time ". In the Boundary Value Analysis, if a single defect is selected, only one variable obtains the extreme value while other variables take the normal value;
  • If multiple defects exist, the "Failure is caused by two or more defects at the same time" requires that multiple variables take the extreme values at the same time when the samples are selected.
Iii. Boundary Value Type: Numeric value, speed, character, address, location, size, and quantity. Iv. Classification of Border Value samples:
  Single Variable if Multi-variable if
Valid Value Basic Boundary Value retry Worst case failover
Invalid value Robustness Test Robust and worst case failover
5. Border Value testing technology: (1) Basic border value testing. There are N input variables. In this example, we design a sequence to take the maximum value, slightly less than the maximum value, normal value, slightly greater than the minimum value and the minimum value of a variable in the Data effective area. For example, we can see two variables X1 and X2. Their valid values are [c, d], [a, B]. For programs with N input variables, the number of samples for basic boundary value analysis is 4n + 1. (2) Robustness test. Robustness refers to the ability of the software to run normally in case of exceptions. The main aspect of robustness is the expected output, not the input. Robustness test is a simple extension of Boundary Value Analysis. In addition to the five boundary analysis values of the variable, we also need to consider the situations where the values slightly exceed the maximum value (max) and slightly less than the minimum value (min. The biggest value of robustness test is to observe and handle exceptions. It is an important means to detect fault tolerance of the software system. For example, see. For programs with N input variables, the number of samples for the robustness test is 6N + 1. (3) Try again in the worst case. In the worst case, when a single defect is rejected, it is concerned about the situation when multiple variables take the extreme value. In the worst case scenario, each input variable is first divided into five elements, including the minimum value, slightly higher than the minimum value, normal value, slightly lower than the maximum value, and maximum value, then perform Cartesian Product Calculation on these sets to generate a token trial instance. In the worst case, the retry will mean more work. For example, see. For programs with N input variables, in the worst case, the number of samples in the trial is 5 ^ n. (4) Try again in the worst case of robustness. Robust and worst case, if you perform the following seven elements for each variable: Minimum value, slightly smaller than minimum value, slightly higher than minimum value, normal value, maximum value, slightly higher than maximum value, slightly lower than maximum value, etc.. Then perform Cartesian Product Operations on these sets to generate a token trial instance. For example, see. For programs with N input variables, the number of samples for a strong and worst case trial is 7 ^ n. 6. Boundary Value samples. 1. Triangle problem Boundary Value Analysis examples. Trial example (basic boundary Trial Analysis ):
Test Case A B C Expected results
TC1 1 100 100 Isosceles triangle
TC2 2 100 100 Isosceles triangle
TC3 199 100 100 Isosceles triangle
C4 200 100 100 Non-Triangle
TC5 100 1 100 Isosceles triangle
TC6 100 2 100 Isosceles triangle
Tc7 100 199 100 Isosceles triangle
TC8 100 200 100 Non-Triangle
Tc9 100 100 1 Isosceles triangle
Tc10 100 100 2 Isosceles triangle
TC11 100 100 199 Isosceles triangle
Tc12 100 100 200 Isosceles triangle
Tc13 100 100 100 Equilateral triangle
2. The worst case scenario of writing the nextdate function.
  • Condition: L ≤ month ≤ 12; 1 ≤ date ≤ 31; 1812 ≤ year ≤ 2012
  • Values of months (2012, 12), dates (, 31), and years)
  • The token trial example after the Cartesian product of these three variables has a total of 5*5*5 = 125 token trial examples. (The example table for trial use is omitted ).

Black box testing (1) ----- border value 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.