It is a common scenario where a Test Case should be run with more than one set of Test Data. Let us take an example to illustrate this scenario.
A screen has following 4 input parameters.
A screen has following 4 input parameters.
- Name - Text Field which takes only alphabets
- Phone Number - Text Field takes only numbers
- Don't Disturb - Radio Button with Yes and No options
Now the possible values for
- Name - alphabets, alpha-numeric characters, special characters, unicode characters, empty string, space, very long string
- Phone Number - numbers, alphabets, alpha-numeric characters, special characters, unicode characters, empty string, space, very long number
- Don't Disturb - Yes, No
Now if we want to come up with Test cases using combinations of this data we will get
7*8*2 = 112 Test CasesBut Pairwise Testing philosophy says
So let us try to reduce these test cases using pairwise tool.Most bugs are found when only two variable values conflict, not when all conflict at the same time. (Ref: Efficient Testing with All-Pairs - Prepared for STAREast 2003 International Conference on Software Testing Bernie Berger)
- Download and extract tool from www.saticefice.com
- Create an excel sheet with Variables as headers(columns) and values as rows
- Save it as .txt file with tab delimited file
- now say perl allpairs.pl blog.txt >allpairs.txt
- Open the file allpairs.txt using excel or numbers(in case of mac)
- Now you can see all the available test cases
Test cases reduced to half in this case.
~Yagna
Yagna,
ReplyDeleteNice post about an important test design technique. You and your readers might also want to check out Hexawise, our more powerful and easier to use test design tool.
More info is available from our site at hexawise.com.
If you have any questions, I'd be happy to answer any questions that you might have.
Thanks!
- Justin Hunter
Founder and CEO of Hexawise