Mastering Software Testing: Techniques and Approaches

Understanding Boundary Value Analysis in Software Testing

Understanding Boundary Value Analysis in Software Testing

INTRODUCTION

Testing the boundary values of both valid and invalid partitions is the foundation of boundary value analysis. Boundaries are where testing is likely to reveal flaws since the behavior at the edge of the equivalence partition is more likely to be erroneous than the behavior inside the enclosure.

It looks for input values close to the border that are more likely to include errors. Every partition has a maximum value and the lowest value, which serve as the partition's boundary values.

Note

  • A valid border value is one that corresponds to a partition that is true.
  • An invalid border value is one that corresponds to an invalid division.
  • For each variable we check-

 - Minimum value.

 - Just above the minimum.

 - Nominal Value.

 - Just below Max value.

 - Max value

Example: Consider a system that accepts ages from 18 to 56.

Valid test cases: Any value entered that is higher than 17 and less than 57 qualifies as a valid test case for the aforementioned.

  • Enter the value- 18.
  • Enter the value- 19.
  • Enter the value- 37.
  • Enter the value- 55.
  • Enter the value- 56.

Invalid test cases: When a value between 18 and 56 is entered, the test case is invalid.

  • Enter the value- 17.
  • Enter the value- 57.

Single Fault Assumption: A single fault assumption can be used when checking many variables for the same application. limiting all variables to the extreme value with the exception of one and permitting the final variable to take the extreme value. If n is a variable, then check:

Problem: Take into account a program for calculating historical data.

Boundary Value Test Case Design

Solution: Assume that the year is a single fault, with values ranging from 1900 to 2000 and others having nominal values.

For checking the n variable There will be a maximum of 4n + 1 test case needed. Consequently, the maximum test cases for n = 3 are

The focus of BVA: The input variable of the function is the primary focus of BVA. Let's establish two variables, X1 and X2, where X1 is located between a and b and X2 is located between c and d.


The basis for BVA is the observation that errors frequently happen close to the variable extremes. Numerous factors could have contributed to the boundary value defect.

Language Typing: BVA is not appropriate for free-form languages like COBOL and FORTRAN, which are categorized as weakly typed languages. This can both be beneficial and lead to bugs.

The strongly typed language PASCAL, ADA mandates that every constant or variable be declared with a corresponding data type.

Boundary Value Analysis Restrictions

  • When the product is through testing, it works well.
  • It is unable to take into account the type of functional connections between variables.
  • BVA is really simplistic.