Pairwise testing is a technique that generates test cases to cover all possible combinations of two test input parameters (2-way) to efficiently find flaws. For an audit testing application with 14 input parameters, traditional testing would require over 18 million test cases, but pairwise testing could cover all 2-way combinations with far fewer test cases, reducing time and effort while still effectively finding 50-90% of flaws.
3. What is pairwise testing?
• Pairwise Testing also known as all-
pairs testing is a testing approach taken
for testing the software using combinatorial
method for two test inputs.
4. n-way combinations
• n = 2, 3, 4, 5, 6
• Focus on testing all possible combinations of
two test inputs (2-way)
5. Benefits of pairwise testing
Total test cases:
> 2^87 = 154.742.504.910.762.534.362.390.528
Pairwise: 16
6.
7. Benefits of pairwise testing
• Tool generates test cases
• Reduce time and effort
• Find flaws efficiently: 50%-90%
8.
9. Apply to pAudit
- Audit types: 14 values
- Audit Title: 1-255 characters
- Medical Blend Rate: number <999.999.999 (pick up 3 random
numbers)
- Compliance Audit: 2 values
- Audit Location: 2 values
- Nature of Audit: 2 values
- Scope of Audit: 2 values
- Coding Classification System: 3 values
- Record Selection by: 2 values
- Record Selection Decided by: 2 values
- Standard list: 9 values
- Audit Date: 1 value
Total test cases: >18 millions
Hello everyone, how are you now? I am very happy to be here to talk about my topic.
The truth is - we want to improve quality of the product but we cannot test everything. Is there anyway to help us select fewer test cases but still achieve adequate coverage? Luckily, we have a test design method to achieve greater coverage in fewer tests. Even though you prioritize speed or thoroughness, this method will help you. This is combinatorial test. Today, I will talk a part of this method, that is pairwise testing.
We have a system which is controlled by switch panel as image. Each switch has 2 states: on/off. A question for you is how many test cases need to be tested for this one? Make sure that the number of test cases can cover at least 50% of the flaws. You think about this and I will come back later. There is a tip that if we use traditional method, we cannot complete the test.
There are 2 factors you need to note here: test inputs and combination.
There are some ways to combine test inputs: 2, 3, 4, 5, and maximum is 6.
Most software defects in production today can be triggered by just one test input.
Bugs also come from the interaction of two test inputs.
Bugs come from 3 or more test inputs are rare.
So, to find bugs efficiently, we should focus first on testing all possible combinations of two test inputs!!!
You – human will identify what test inputs should be tested.
Computer – used computer algorithms generate test cases for you.
Why we need to use pairwise testing? Is there any benefit?
To talk about the most benefits of pairwise testing, I will come back the example. How many test cases need to be tested to cover at least 50% of the flaws? Does anyone have a specific number?
With traditional method, total test cases to be tested: greater than 2^87 (two to the power eighty seven).
Is your number closed to this? :D
How many test cases do you think pairwise can offer?
With pairwise, we just need: 16 (2-ways) test cases. Each test case has to set state for 87 switches.
Am I lying?
Here are the number of test cases are generated by tool.
You job is just identify test inputs, computer will generate test cases for you.
Fewer of test cases
Better of tests.
Although, it is good but not enough. It has limitation and cannot cover 100% of the flaws.
Now, does anyone want to get on the plane which is covered 90% of the flaws?
With those benefits, I decided to apply this method for pAudit.
In pAudit, we have a create audit feature which is required data like this. How many test case I had to test for this feature?
More than 18millions? Did I do that? Of course, NO. I am a lazy tester, so I did not do that. I just ran fewer.
With 126 test cases, they can cover 100% of the flaws.
I just put 3 constraint, the number of test cases are fewer. So, will you apply this method to your project?
I just introduce a great testing method. Not just fewer, better tests.