Tuesday 21 May 2013

Functional Testing Boundary Value Testing – Equivalence Class Testing

Agenda :
Boundary Value Testing
         Boundary Value Analysis
           Generalizing Boundary Value Analysis
         Limitations of Boundary Value Analysis
                                                        Robustness Testing
                                                        Worst Case Testing
                                                        Special Value Testing  
Examples
                                                                Test Cases for the Triangle Problem
                                Test Cases for the NextDate Problem
                                Test Cases for the Commission Problem
                                Guidelines for Boundary value Testing    ........
Equivalence Class Testing

Equivalence Classes
·         Weak Equivalence Class Testing
·         Strong Equivalence Class Testing
·         Traditional Equivalence Class Testing
Equivalence Class Test Cases for the Triangle Problem
Equivalence Class Test Cases for the NextDate Function
Equivalence Class Test Cases for the Commission Problem
Guidelines and Observations

Boundary Value Analysis:

   ·Basic idea: use input variable values at their minimum (min), just above the minimum (min+), a nominal value (nom), just below their maximum (max-), and at their maximum (max)

“Single fault” assumption in reliability theory: failures are only rarely the result of the simultaneous occurrence of two (or more) faults.
 
·         The boundary value analysis test cases are obtained by holding the values of all but one variable at their nominal values, and letting that variable assume its extreme values
 

Boundary value analysis works well when the program to be tested is a function of several independent variables that represent bounded physical quantities

e.g. NextDate test cases are inadequate (little stress on February, dependencies among month, day, and year)
e.g. variables refer to physical quantities, such as temperature, air speed, load etc.
Equivalence Classes
Motivations

       Have a sense of complete testing
       Avoid redundancy

Equivalence classes form a partition of a set, where partition refers to a collection of mutually disjoint subsets whose union is the entire set (completeness, non-redundancy)
The idea is to identify test cases by using one element from each equivalence class
“treated the same” → “traversing the same execution path”
The key is the choice of the equivalence relation that determines the classes
Defines equivalence classes in terms of validity  
Commission problem
Valid inputs: 1 ≤ lock ≤ 70, 1 ≤ stock ≤ 80,             1 ≤ barrel ≤ 90
Invalid inputs: lock < 1, lock > 70, stock < 1,         stock > 80, barrel < 1, barrel > 90

For valid inputs, use one value from each valid class (like weak equivalence testing)
For invalid inputs, a test case will have one invalid value and the remaining values will all be valid (single failure)
 

No comments:

Post a Comment