- Home
- WebDriver-Automation-Tutorial
- Distributed-Automation-using-C#-Sharp-Webservice-Tutorial
- QTP-UFT-Tutorial
- Selenium
- C#-UI-Automation-Tutorial
- Python-Automation
- Algorithms-Tutorials
- Sort-Algorithm-Tutorial
- Array-Algorithms-Tutorial
- Linked-Lists-Algorithms-Tutorial
- Junit
- Test-Design-Techniques
- Test-Strategy
- SDLC-Models
- Agile
- Software-Metrics
- Software-Quality
- Test-Effort-Estimation
- Testing-Fundamentals
- PMP
- UnitTest-CppUnit-C++
- ALM-Quality-Center
- Network
- SQL-Database-Designing
- Tech-Notes
- QA-Interview-Tips
- Contact-Us
- Selenium and Web Driver
- Security-Concepts

**by ARUP BASU**

It’s generally considered that any chance of finding a defect mostly depends on two variables. The chance of finding a defect which depends on three or more variables is there, but less. It has been observed that the return on investment is less if there are many variable combinations to test . Also , in majority of the cases, defects are uncovered by testing two variables together .That is, one variable may work fine by itself , but fails when paired with another.

For example, say a kitchen system comprises of five variables like heating, lighting, electricity, gas and water, its most likely that if there is an error, it will be found by testing two variables together , like gas and electricity, heat and gas , water and light , light and heat . Chance of finding a defect when three or more variables are combined is there, but less, as, if the earlier pairs were tested , they would most likely have discovered the error. **This is the background of pair wise testing** or all pairs testing, where a system is tested by pairing variables.

How many combinations are possible if there are six variables like heating, lighting, electricity, gas , water and floor cleaner , and of these variables have 6 values each? For example:

Electricity : possible values : AC 110 Volt , AC 220 Volt , AC 440 Volt , DC 110 Volt , DC 220 Volt , DC 440 Volt

Water : possible values: Filtered water, Tap water, Bottled Water, Mineral water, Pond Water, RO water

If we create combinations of these variables, there can be 6 to the power 6 combinations or 6 X 6 X 6 X 6 X 6 X 6 = **46656 combinations!**

This is a huge task to test, if we have to test each combination. The task becomes more complicated if there are more variables, or if the variables have more values. To explain, let’s make a table below:

The above represents just 6 combinations, by varying the values of just one variable , and once , Electricity. If we vary Heating , we get another combination:

And just by left shifting Electricity values just once , we get another combination of six values

---ARUP BASu

So we see that there are 46656 combinations possible by just changing or shifting values. If one person has to test these combinations, how many days will he take? With a very optimistic 20 tests a day , it would take 2332 days or 6.4 years !

So it’s not viable situation that we are in. We need a method which will cut down the time to test by optimizing the combinations . There comes the value of Pairwise testing or All pairs testing which espouses that each value of the above variables is tested in a pair with every value of the other variables.

But how the pairwise combinations can be created ?

Orthogonal Array allows us to make perfect pairwise combinations .

Orthogonal array is a two dimensional array. We shall explain the various terms associated with it .

- Rows of the array are equivalent to the number of test cases.
- Columns of the array are equivalent to the number of variables.
- Values are what a variable can have.

An orthogonal array may look like the following:

*X _{Number of test Cases}(Values ^{Number of} ^{Variables}) Or X _{Rows}(Values ^{Columns})*

So Number of test cases = number of rows and Number of Variables = Columns.

To identify an orthogonal array for your problem, follow the below guidelines:

*Check the number of variables in the problem**The variables correspond to the columns of the array.**Check the maximum number of values that a variable can have.**Find a suitable orthogonal array with the smallest number of rows , which has the same or more number of variables and values*

Many orthogonal arrays are available at **Sloane** site

An orthogonal array **oa.N.k.s.t. **name indicates an orthogonal array with N runs (or tests or rows) , k factors(or variables), s levels(or values) , and strength t.

oa.4.3.2.2 indicates

- Rows - 4
- Variables or Columns - 3
- Value - each variable has 2 values

So , if a problem has: 4 variables like Bike brand , head lamp , tyre and engine ,And each variable can have two values ,then the number of levels is 2 , and number of variables is 4 .

Then we have to look for an array similar to 0a.N.4.2.t , having the lowest N value. From the above mentioned Sloane web site , we are getting a somewhat similar array oa.8.4.2.3, which has 4 variables, 2 levels.

The oa.8.4.2.3 implementation is as follows

The values of the variables are as follows

Now , as we put the values in the array, and each row becomes a test case as given below. So the orthogonal array and pairwise testing concept has cut down the full test effort to 8 tests.

If there is no Orthogonal array available having similar number of variables , pick the next array having higher number of variables, and then ignore the extra columns. For example , if number of variables is 5 and one of the variables has values as 3 where as other variables have maximum values as 2 . and say , the orthogonal array available is OA.N.6.3.t , then take this array and ignore the sixth column.Plot values for the rest of the columns or variables.

**ARUP BASU**

- Test Design Techniques
- Cause and Effect diagram
- State Transition Diagram
- Decision Tables
- Equivalence Partition
- Pairwise & Orthogonal Array Testing Tutorial
- Boundary Value
- All Pairs and Combinatorial testing

**QTP-UFT-Tutorial**

QTP-Keyword-View

Spy Tool

QTP-UFT-Object-Repository

QTP / UFT Automation Framework

Part 1

Part 2

Part 3

Part4

Part 5

Part 6

Part 7

- Using CppUnit for C++ Unit Testing
**Metrics**

Requirement churn metrics

Estimation Churn metrics

Defects per KLOC

Cyclomatic Complexity of Code metrics

CCCC tool for calculating Cyclomatic ComplexityDefect removal efficiency (DRE) metrics

Fault Density metrics

Defect Density Metrics