Tuesday, June 1, 2010

How to reduce number of tests using test techniques

Many a times we are required to perform validation with a large number of test scenarios that will require significant time and effort to cover the complete coverage. Most of us face this challlenge on a day to day basis due to following reasons:
1. Large number of Permutation and Combination of tests
2. Lack of resource and time available for testing
3. History data is not available that will help identify prioritization of test 

To tackle this problem we may use test techniques that may help in reducing the number of tests and at the same time provide high level of coverage. This will ensure that we are using our resources effectively and optimally. one of the techniques that was used extensively in manufacturing domain and now used in software testing is Design Of Experiment (DOE).

DOE allows statistical analysis by experimenting behavior of different combinations of data. When you have large number of combinations then you can design your test data with Orthogonal Array (All Pair) techniques to reduce your number of tests. In this case instead of testing all n * n-1 combinations we create all possible pairs of data and test them.  Let's take an example:

Suppose you have following parameters to test:

O/S
Win 2008
Red Hat Linux
Mac

Browser
IE
Mozilla

Print size
A4
A5

In this case if you take all combinations then you will get a total of 3*2*2 = 12 combinations, with all pair technique you can get this validated in only 6 combinations:



TEST CASES


Case


O/S


Browser


Print


1


Win


IE


A4


2


Win


Mozilla


A5


3


Linux


IE


A5


4


Linux


Mozilla


A4


5


Mac


IE


A4


6


Mac


Mozilla


A5

As the number of test combinations increased you will see lot of difference between all nth combination test and all pair test.
There are tools also available but I have found tool provided by James Bach site as very effective and easy to use. There is a document inside the zip file that illustrates on how to execute the tool.
I would be more than happy to answer any related question on this.

No comments: