Monday, May 4, 2009

BVA and ECP

Boundary Value Analysis

Boundary Value Analysis (BVA) is a test data selection technique (Functional Testing technique) where the extreme values are chosen. Boundary values include maximum, minimum, just inside/outside boundaries, typical values, and error values. The hope is that, if a system works correctly for these special values then it will work correctly for all values in between.

§  Extends equivalence partitioning

§  Test both sides of each boundary

§  Look at output boundaries for test cases too

§  Test min, min-1, max, max+1, typical values

 

§  BVA focuses on the boundary of the input space to identify test cases

§  Rational is that errors tend to occur near the extreme values of an input variable

 

 

There are two ways to generalize the BVA techniques:

1.    By the number of variables

o    For n variables: BVA yields 4n + 1 test cases.

2.    By the kinds of ranges

o    Generalizing ranges depends on the nature or type of variables

§  NextDate has a variable Month and the range could be defined as {Jan, Feb, …Dec}

§  Min = Jan, Min +1 = Feb, etc.

§  Triangle had a declared range of {1, 20,000}

§  Boolean variables have extreme values True and False but there is no clear choice for the remaining three values

 

Advantages of Boundary Value Analysis

1.    Robustness Testing - Boundary Value Analysis plus values that go beyond the limits

2.    Min - 1, Min, Min +1, Nom, Max -1, Max, Max +1

3.    Forces attention to exception handling

4.    For strongly typed languages robust testing results in run-time errors that abort normal execution

           

Limitations of Boundary Value Analysis

BVA works best when the program is a function of several independent variables that represent bounded physical quantities

1. Independent Variables

o    NextDate test cases derived from BVA would be inadequate: focusing on the boundary would not leave emphasis on February or leap years

o    Dependencies exist with NextDate's Day, Month and Year

o    Test cases derived without consideration of the function

2. Physical Quantities

o    An example of physical variables being tested, telephone numbers - what faults might be revealed by numbers of 000-0000, 000-0001, 555-5555, 999-9998, 999-9999?

10.2.4 Equivalence Partitioning

Equivalence partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived.

EP can be defined according to the following guidelines:

1. If an input condition specifies a range, one valid and one two invalid classes are defined.

2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.

3. If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.

4. If an input condition is Boolean, one valid and one invalid class is defined.

 

No comments:

Post a Comment