Loadrunner
VuGen(Virtual User Generator) Script Example in LoadRunner
What is VUGen? VUGen (Virtual User Generator) is a key tool in LoadRunner to create testing...
Orthogonal Array Testing (OAT) is software testing technique that uses orthogonal arrays to create test cases. It is statistical testing approach especially useful when system to be tested has huge data inputs. Orthogonal array testing helps to maximize test coverage by pairing and combining the inputs and testing the system with comparatively less number of test cases for time saving.
For example, when a train ticket has to be verified, factors such as - the number of passengers, ticket number, seat numbers, and train numbers have to be tested. One by one testing of each factor/input is cumbersome. It is more efficient when the QA engineer combines more inputs together and does testing. In such cases, we can use the Orthogonal Array testing method.
This type of pairing or combining of inputs and testing the system to save time is called Pairwise testing. OATS technique is used for pairwise testing.
In this tutorial, you will learn-
In the present scenario, delivering a quality software product to the customer has become challenging due to the complexity of the code.
In the conventional method, test suites include test cases that have been derived from all combination of input values and pre-conditions. As a result, n number of test cases has to be covered.
But in a real scenario, the testers won't have the leisure to execute all the test cases to uncover the defects as there are other processes such as documentation, suggestions, and feedback from the customer that has to be taken into account while in the testing phase.
Hence, the test managers wanted to optimize the number and quality of the test cases to ensure maximum Test coverage with minimum effort. This effort is called Test Case Optimization.
The formula to calculate OAT
A single factor has 2 to 3 inputs to be tested. That maximum number of inputs decide the Levels.
A Web page has three distinct sections (Top, Middle, Bottom) that can be individually shown or hidden from a user
(4 is the number of runs arrived after creating the OAT array)
If we go for Conventional testing technique, we need test cases like 2 X 3 = 6 Test Cases
| Test Cases | Scenarios | Values to be tested |
|---|---|---|
| Test #1 | HIDDEN | Top |
| Test #2 | SHOWN | Top |
| Test #3 | HIDDEN | Bottom |
| Test #4 | SHOWN | Bottom |
| Test #5 | HIDDEN | Middle |
| Test #6 | SHOWN | Middle |
If we go for OAT Testing we need 4 Test cases as shown below:
| Test Cases | TOP | Middle | Bottom |
|---|---|---|---|
| Test #1 | Hidden | Hidden | Hidden |
| Test #2 | Hidden | Visible | Visible |
| Test #3 | Visible | Hidden | Visible |
| Test #4 | Visible | Visible | Hidden |
A microprocessor's functionality has to be tested:
By using the Conventional method we need = 81 test cases to cover all the inputs. Let's work with the OATS method:
No. of factors = 4 (temperature, pressure, doping amount and Deposition rate)
Levels = 3 levels per factor (temperature has 3 levels-100C, 150C, and 200C and likewise other factors too have levels)
Create an array as below:
1. Columns with the No. of factors
| Test case # | Temperature | Pressure | Doping amount | Deposition rate |
|---|---|---|---|---|
2. Enter the number of rows is equal to levels per factor. i.e temperature has 3 levels. Hence, insert 3 rows for each level for temperature,
| Test case # | Temperature | Pressure | Doping amount | Deposition rate |
|---|---|---|---|---|
| 1 | 100C | |||
| 2 | 100C | |||
| 3 | 100C | |||
| 4 | 150C | |||
| 5 | 150C | |||
| 6 | 150C | |||
| 7 | 200C | |||
| 8 | 200C | |||
| 9 | 200C |
3. Now split up the pressure, doping amount and the deposition rates in the columns.
For eg: Enter 2 psi across temperatures 100C,150C and 200C likewise enter doping amount 4% for 100C,150C and 200C and so on.
| Test case # | Temperature | Pressure | Doping amount | Deposition rate |
|---|---|---|---|---|
| 1 | 100C | 2 psi | 4% | 0.1 mg/s |
| 2 | 100C | 5 psi | 6% | 0.2 mg/s |
| 3 | 100C | 8 psi | 8% | 0.3 mg/s |
| 4 | 150C | 2 psi | 4% | 0.1 mg/s |
| 5 | 150C | 5 psi | 6% | 0.2 mg/s |
| 6 | 150C | 8 psi | 8% | 0.3 mg/s |
| 7 | 200C | 2 psi | 4% | 0.1 mg/s |
| 8 | 200C | 5 psi | 6% | 0.2 mg/s |
| 9 | 200C | 8 psi | 8% | 0.3 mg/s |
Hence, in OAs, we need 9 Test cases to cover.
Conclusion:
Here we have seen how OAT (Orthogonal Array Testing) can be used to reduce the testing efforts and how test case optimization can be achieved.
This article is contributed by Madhumitha.
What is VUGen? VUGen (Virtual User Generator) is a key tool in LoadRunner to create testing...
This tutorial introduces the seven basic Software Testing Principles that every Software tester...
Code coverage testing is an important measure that quantifies the degree to which the source code...
Testing as a Service (TaaS) Testing as a Service (TaaS) is an outsourcing model, in which software...
What is SOA Testing? SOA (Service Oriented Architecture) Testing is a Testing of SOA architectural style in...
What is SDLC? SDLC is a systematic process for building software that ensures the quality and...