Pairwise Testing Technique - Easy Solving

Introduction 

Pairwise or All pair testing technique is approach to test software using combinatorial method.It's a method to test all the possible discrete combinations of the parameters involved. This technique is an effective test case generation technique that is based on the observation that most faults are caused by interactions of at most two factors. Pairwise-generated test suites cover all combinations of two therefore are much smaller than exhaustive ones yet still very effective in finding defects.

When to use Pairwise Test Method ?

For example, consider the testing of a web application that has four features (factors) say OS, speed, browser types and anti-virus software and each of these factors has five values (options). In order to have a full coverage for the application, we need to test 5 x 5 x 5 x 5 = 625 combinations, which is not easily possible. We may test all these combinations, provided we have enough time and budget. However, what if we do not have enough time and budget? Pairwise testing is the technique we can use in such a situation.

If you would like to read more about this testing technique I recommend this site. There are also online tools available which can be used to generate test combinations, this is the site which gives information about available tools.

Now let us consider sample question:

Q. A company offering house insurance policies has several policy options. They depend on the following factors: 
  • Building type: house, semi-detached, apartment building, cottage 
  • Material: wood, concrete, brick, mixed 
  • Location: city, suburb, countryside, wilderness 
You are testing the system and using the pairwise technique for creating test cases. Using the pairwise technique, how many test cases are required to achieve 2-wise coverage? 

Answer: 
A. 16 
B. 12 
C. 256 
D. 4

Solution: 

In order to calculate the number of test cases, we need to identify the test relevant features called "Classifications" and their corresponding values called "Classes". By analyzing the requirement specification, we can identify classification and classes.
Considering the sample question above:

Classification
No. of Classes
Details
Building type
4
house, semi-detached, apartment building, cottage
Material
4
wood, concrete, brick, mixed 
Location
4
city, suburb, countryside, wilderness 

In 1-wise coverage, each value of every parameter must be at least once included which is nothing but finding minimum number of test cases we get by applying pairwise method.

Minimum number of test cases = Number of classes in the classification which has maximum number of classes.

Applying the formula in the above scenario to find out the minimum number of test cases.
Minimum number of test cases = 4

So, formula for 2 - wise coverage is:

Minimum number of test cases = Cartesian product of two classes in the classification which has maximum number of classes.

Minimum number of test cases = 16 ( 4X4 )

Answer: Option A. 16 Test Cases

Consider if our Classification and classes where like in the table below:

Classification
No. of Classes
Details
Building type
4
house, semi-detached, apartment building, cottage
Material
3
wood, concrete, brick
Location
2
city and suburb

Then our 1 -wise coverage would be = 4 and 2 - wise coverage would be 4X3 = 12

Comments

  1. Pairwise Testing Technique - Easy Solving >>>>> Download Now

    >>>>> Download Full

    Pairwise Testing Technique - Easy Solving >>>>> Download LINK

    >>>>> Download Now

    Pairwise Testing Technique - Easy Solving >>>>> Download Full

    >>>>> Download LINK CX

    ReplyDelete

Post a Comment

Please leave your comments here