0% found this document useful (0 votes)
24 views5 pages

Orthogonal Array Testing Explained

Uploaded by

meet2003j
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

Orthogonal Array Testing Explained

Uploaded by

meet2003j
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Orthogonal Array Testing

Orthogonal Array Testing is a systematic and statistical way of testing, especially helpful when
dealing with multiple variables and their interactions. It allows for a reduced number of test
cases while ensuring coverage of significant combinations of input parameters.

▪ L represents the Orthogonal Array.


▪ Runs indicates the total number of test cases derived from the orthogonal array.
▪ Levels signifies the number of possible values each factor can take.
▪ Factors are the independent variables in the system that are being tested.
Example-1: Consider a login feature of a web application as an example.
We will focus on three factors:

1. Username Input (Factor 1)


2. Password Input (Factor 2)
3. Login Button Response (Factor 3)

Step 1: Define the Factors and Levels

• Factor 1: Username Input


o Level 1: Correct username
o Level 2: Incorrect username
• Factor 2: Password Input
o Level 1: Correct password
o Level 2: Incorrect password
• Factor 3: Login Button Response
o Level 1: Immediate response
o Level 2: Delayed response

Thus, we have 3 factors, each having 2 levels.


Step 2: Select the Orthogonal Array
Since we have 3 factors and each has 2 levels, the appropriate orthogonal array to use is
L4(2^3). This means:
• L4 represents 4 runs or test cases.
• 2 represents 2 levels for each factor.
• 3 represents 3 factors.
The orthogonal array for this configuration looks like this:

Test Factor 1 (Username Factor 2 (Password Factor 3 (Login


Case Input) Input) Response)
1 Correct Correct Immediate
2 Correct Incorrect Delayed
3 Incorrect Correct Delayed
4 Incorrect Incorrect Immediate

Step 3: Construct the Test Cases


Each row in the orthogonal array represents a unique combination of factors that you will test.
Below are the test cases corresponding to the array.
1. Test Case 1:
o Correct username, Correct password, Immediate response
o Expected result: Successful login.
2. Test Case 2:
o Correct username, Incorrect password, Delayed response
o Expected result: Login fails with error message after delay.
3. Test Case 3:
o Incorrect username, Correct password, Delayed response
o Expected result: Login fails with error message after delay.
4. Test Case 4:
o Incorrect username, Incorrect password, Immediate response
o Expected result: Login fails immediately with an error message.
Step 4: Execute the Test Cases
Perform the test cases as per the combinations defined in the orthogonal array. For each case,
check the expected behavior of the system against the actual result.
Step 5: Analyze the Results
After running all the test cases, analyze if the results conform to the expected outcomes. This
will help in identifying any issues related to specific factor combinations.
Note: Using the Orthogonal Array Testing method, for the given example we were able to
reduce the number of test cases from 8 (all combinations of 2^3) to just 4, covering all possible
critical combinations of factors. This significantly saves time and resources while maintaining
the effectiveness of testing for different interactions between factors.
Example-2: Consider that you want to test the Add to Cart feature across different browsers,
operating systems, and payment methods.
We will focus on three factors:

1. Browser (Factor 1)
2. Operating System (Factor 2)
3. Payment Methods (Factor 3)
Factor 1: Browser
• Level 1: Chrome
• Level 2: Firefox
• Level 3: Safari
Factor 2: Operating System
• Level 1: Windows
• Level 2: macOS
• Level 3: Linux
Factor 3: Payment Method
• Level 1: Credit Card
• Level 2: PayPal
Step 2: Select the Orthogonal Array

3 factors: Browser, Operating System, and Payment Method.


3 levels for the Browser and Operating System, and 2 levels for Payment Method.
To accommodate the different numbers of levels, we can use the L9(3^3 2) orthogonal array,
which means:
• L9 represents 9 runs (test cases).
• 3^3 indicates that three factors have 3 levels each.
• 2 indicates that one factor (Payment Method) has 2 levels.
The orthogonal array for this configuration is:

Test Case Factor 1 (Browser) Factor 2 (OS) Factor 3 (Payment Method)


1 Chrome Windows Credit Card
2 Chrome macOS PayPal
3 Chrome Linux Credit Card
4 Firefox Windows PayPal
5 Firefox macOS Credit Card
6 Firefox Linux PayPal
7 Safari Windows Credit Card
8 Safari macOS PayPal
9 Safari Linux Credit Card
Step 3: Construct the Test Cases
Each row in the orthogonal array corresponds to a test case. These test cases cover different
combinations of browsers, operating systems, and payment methods.
1. Test Case 1: Chrome, Windows, Credit Card
o Expected result: Product successfully added to cart and paid for using Credit
Card on Chrome in Windows.
2. Test Case 2: Chrome, macOS, PayPal
o Expected result: Product successfully added to cart and paid for using PayPal
on Chrome in macOS.
3. Test Case 3: Chrome, Linux, Credit Card
o Expected result: Product successfully added to cart and paid for using Credit
Card on Chrome in Linux.
4. Test Case 4: Firefox, Windows, PayPal
o Expected result: Product successfully added to cart and paid for using PayPal
on Firefox in Windows.
5. Test Case 5: Firefox, macOS, Credit Card
o Expected result: Product successfully added to cart and paid for using Credit
Card on Firefox in macOS.
6. Test Case 6: Firefox, Linux, PayPal
o Expected result: Product successfully added to cart and paid for using PayPal
on Firefox in Linux.
7. Test Case 7: Safari, Windows, Credit Card
o Expected result: Product successfully added to cart and paid for using Credit
Card on Safari in Windows.
8. Test Case 8: Safari, macOS, PayPal
o Expected result: Product successfully added to cart and paid for using PayPal
on Safari in macOS.
9. Test Case 9: Safari, Linux, Credit Card
o Expected result: Product successfully added to cart and paid for using Credit
Card on Safari in Linux.

Step 4: Execute the Test Cases

Run each test case as defined in the orthogonal array. This will allow you to observe the
behavior of the Add to Cart and Payment functionality across different browser, operating
system, and payment method combinations.
Step 5: Analyze the Results

Once all the test cases are executed, evaluate whether the functionality worked as expected
for each combination. This helps identify any issues specific to a browser, operating system,
or payment method.

Note: Using the Orthogonal Array Testing method here, we reduced the total number of test
cases from what would have been 18 test cases (3 browsers × 3 operating systems × 2 payment
methods = 18) to just 9 test cases. This greatly reduces the effort required while ensuring that
all critical combinations of browser, operating system, and payment method are covered.

Common questions

Powered by AI

Orthogonal array testing impacts resource allocation by enabling more efficient use of time and manpower. By reducing the number of test cases from the exhaustive set of all possible combinations to a smaller, manageable set, less personnel is needed to execute the tests, and less time is expended in conducting them. This efficiency allows resources to be reallocated to other critical areas of the project, enhancing overall productivity without compromising test coverage .

Executing and analyzing test cases derived from orthogonal arrays is significant because it ensures that the system under test behaves as expected across critical factor interactions. By conducting these tests, testers can identify potential issues or bugs that may occur due to specific combinations of factors. Furthermore, analyzing the results helps verify that the orthogonal array methodology effectively identifies significant interactions and informs corrective actions if necessary .

Potential limitations of using orthogonal array testing include its inability to cover all possible scenarios, especially those involving higher-order interactions that might require more test cases than those provided by the array. While it is efficient for testing pairwise interactions, certain critical bugs that manifest only under rare multi-factor interactions might be missed. Moreover, choosing the wrong array configuration or misinterpreting test results due to oversimplification of factor interactions could lead to incomplete testing .

The selection of levels for factors directly influences the complexity and type of orthogonal array used in the testing process. Each level represents a distinct state or variant of a factor that must be tested. When factors have different numbers of levels, a more complex array must be chosen to ensure all critical interactions are tested. For instance, an L9(3^3 2) array is selected for factors with unequal levels, such as different browser and operating system combinations, to ensure comprehensive coverage of possibilities .

Orthogonal arrays provide a systematic approach by methodically structuring tests to efficiently cover critical combinations and interactions of factors with fewer test cases. This contrasts with exhaustive testing, which tests all possible combinations, often resulting in resource-intensive scenarios. Compared to random testing, orthogonal arrays ensure strategic coverage, minimizing risk of missing important interactions due to random chance. This methodical arrangement offers a middle ground where strategic efficiency and coverage are optimized .

The choice of an orthogonal array is determined by the number of factors and the number of levels for each factor in the test scenario. For example, if there are three factors with each having two levels, an L4(2^3) orthogonal array is appropriate as it can accommodate the factors efficiently. When factors have differing numbers of levels, such as three levels for some factors and two for others, a more complex array like L9(3^3 2) is used to account for these variations and ensure that all critical combinations are covered systematically .

Using an orthogonal array is beneficial because it allows for a significant reduction in the number of test cases, from testing all possible combinations to testing only the most critical interactions. This efficiency is achieved by utilizing the systematic and statistical approach of orthogonal arrays, which ensure coverage of all factor interactions with fewer cases. For example, in testing an Add to Cart feature, the number of test cases is reduced from 18 to 9, drastically saving time and resources while maintaining comprehensive coverage of system behaviors .

The Orthogonal Array Testing method optimizes the testing process by reducing the number of test cases required from 8 to 4 while ensuring coverage of significant combinations of input parameters. It accomplishes this by organizing the factors (username input, password input, and login button response) and their levels (correct/incorrect and immediate/delayed) into an L4(2^3) orthogonal array, which helps test critical interactions between these factors systematically .

In the context of orthogonal array testing, 'factors' are the independent variables being tested, such as username input, password input, and login button response in the login feature example. 'Levels' are the specific values each factor can take, for instance, a correct or incorrect username, correct or incorrect password, and immediate or delayed response. Each factor's levels determine the possible states to be tested, helping to formulate a structured orthogonal array such as L4(2^3), that efficiently covers the necessary factor combinations .

The L9(3^3 2) orthogonal array configuration helps by allowing an effective allocation of test cases across differing levels of factors, such as three browsers and operating systems each having three levels, and payment methods having two levels. This configuration ensures that all critical interactions are captured by systematically organizing test cases to cover the variety of browser, operating system, and payment method combinations efficiently, reducing the test cases from 18 to 9 .

You might also like