Test Design Techniques overview. Part 2: Software testing example

Screenshot of omni.day's interface

Quality assurance engineers use a lot of tools that help them identify software vulnerabilities, reduce the number of errors and unpredictable results, and thereby improve the end product. It’s important to note that when we use the word tools, it means not only the actual programs that help to test the front-end and back-end, create different metrics, and complete documentation, but it also includes various strategies, methods, and techniques. In the second part of our test design techniques overview, we want to share our experience and demonstrate the QA process on a real-life project.

First, let’s brush up on what the test design is and why it is needed. 

Test design involves creating test cases to cover specific functionality, requiring the selection of the right technique to determine which values to enter and the steps to follow.

The benefits of test design techniques are as follows:

  • Structuring the scope of work (it contains a certain algorithm of actions)
  • Saving resources (reduction of testing costs: time, effort, and money)
  • Increasing the quality of the product (by providing effective detection of errors)

In general, using a suitable test design technique can reduce the number of necessary tests, thus providing a high level of test coverage with minimal effort.

Categories

All black box techniques can be conditionally divided into 3 main categories:

  • Basic
  • Combinatorial
  • Visualized

To reveal the essence of each technique, we decided to demonstrate the testing process on the real project – omni.day. It’s a freelance platform with two user roles: individuals who can post their services with a fixed currency and price, as well as customers who can search and book the service by selecting time and location. 

Basic techniques

Equivalence partitioning

In the example below, you can see 3 service types presented in the form of tabs. Each of them – Online, In-call, and Out-call – will serve us as a separate class: 

The equivalence partitioning test design technique is based on the principle of dividing the input data into classes to ensure that each of them is represented at least once. Therefore, it allows the identification of representatives that can cause the same reaction in a system.

Screenshot showing omni.day's service types

If we assume that the system reacts equally to each of them in the same way and creates meetings that belong to each category, then we can cover all classes with the test.

In the next example, we can see the same service types, along with the available currency options – Pounds, Dollars, and Euros: 

Screenshot showing omni.day's service types and currency options

In this situation, we can apply the equivalence partitioning again and represent each of them as a class. 

Usually, equivalence partitioning is used when we already have predefined categories. Nevertheless, its implementation may not always be so obvious. For example, we can apply this technique to input fields, such as name and URL: 

Screenshot showing omni.day's input fields

To do this, we can take letters, numbers, special characters, and spaces as separate categories. This approach allows us to conduct thorough validation checks on the input fields.

It’s quite common to come across situations within a module where this technique can be used multiple times for different categories, just as in our example. Moreover, depending on the requirements and resources you have, these options can be combined, but we will talk about this later in the article.

In summary, equivalence partitioning is effective when you need to cover a large number of possible variations of input data that can be combined into groups or categories. However, it’s better to limit the number of tests in order to run them efficiently.

Boundary value analysis

The boundary value analysis is aimed at detecting errors associated with extreme values of the input data. Its key advantage is the ability to identify software vulnerabilities at the limits of its functionality, as you take the smallest and largest possible values, along with those lying on the border of these extremes. 

Now, we should look at one of the use cases. Here, we have a Description field limited to 200 input characters:

Screenshot showing omni.day's description field

First, we take the extreme values, which are 1 and 200, and then we add a few more checks using the values ​​that are on the boundaries: 0, 2, 199, and 201. Thus, we get 6 test cases that fully cover our functionality. It should be noted that 0, in our example, is a check when we simply leave our field empty, examining exactly how our application will react to this. It can be especially important if this field is indispensable according to the requirements.

To conclude, the boundary value analysis is needed when there is an assumption that the app may behave differently at the limits of the allowable values, as it can often hide potential problems in the app.

Combinatorial techniques

As an example for this category, we decided to take the parameters related to the meeting creation for each service type. Since we have 3 services, and each of them has the same options for currency and the meeting duration, it’s possible to check their combinations:

Table with service, meeting duration and currency options

All combinations

The all combinations test design technique is aimed at creating test cases by taking into account all possible combinations of input data or conditions. Its main advantage is that each test uses a unique combination of input parameters, allowing errors or unexpected results to be detected under different usage scenarios.

In fact, the principle of their creation depends on your convenience preferences. If it’s easier for you to change their order and, for example, start with the second one, that’s perfectly fine.

So, what we need to do:

  1. Take one value of the first column – Online
  2. Add one value of the second column – 15 minutes
  3. Set each parameter of the third column for this pair

Next, we again take the value of the first column – Online, but now we add 30 min from the second column to it and set each of the currencies to this combination. After we run out of options from the second column, we change the parameters of the first column from online to in-call and perform exactly the same operations. Our table shows all possible combinations of our parameters:

All combinations technique example
The second part of all combinations technique example

It’s worth mentioning that even before testing and completing a table with cases, you can calculate the total number of combinations. To do this, you simply need to multiply the number of values for each parameter. So, we have 3 values for Services, 4 values for Duration, and 3 values for Currency. As a result, we need to test 36 combinations.  However, a large number of parameters can lead to a significant increase in the number of tests that need to be performed. Therefore, in practical situations, you need to balance the coverage of different test combinations with limited resources. 

To sum up, the all combinations technique proves useful when we need to check all possible combinations to avoid any bugs related to the interaction of parameters.

Pairwise testing

Pairwise testing is one of the most used test design techniques in Quality Assurance and is aimed at evaluating a system by creating combinations of two parameters. Its main advantage, in comparison with all combinations technique, is reducing the number of tests, as many errors in programs are detected during the interaction of two parameters.

To structure the information, we should start by creating a table. For that, we will rely on the parameter that has the largest number of values, which, in our case, is Duration. We write them in a column, and then, for each value, we must substitute a pair of our types of services. Since we do not have strict requirements for specific pairs (when 1 value can only be with a specific other), we simply add the value of the third parameter.

This way, we check all pairs of services and duration, duration and currency, as well as services and currency:

Pairwise testing example

This is the basic principle of manually building a table, but if there are many parameters, values, and certain correlation conditions, then you can use special online tools. 

Generally, the pairwise testing technique is used when we have many parameters that interact with each other, but there are serious resource limitations. It can significantly lessen the number of tests compared to the all combinations method, keeping the effectiveness of detecting errors. 

Each choice testing

Each choice testing is aimed at investigating all possible variant values of each parameter in the app in separate tests. The maximum number of test cases will correspond to the maximum value number of one of the parameters. 

We have the most values in the Duration column – 4, so we write out all these values. Then, simply add everything we have left. Since our Services and Currency have the same number of values, it doesn’t matter what we write down first. In addition, since there are only three Services and Currencies, we do not have enough data for the last test case with a duration value of 1 hour. That’s why we take any value from our parameters. Thus, each value of each parameter is checked at least once:

Each Choice testing example

Each choice testing can be used to cover all possible variants of parameter values in separate tests so that each parameter occurs in a combination at least once. As a result, it allows the identification of errors or unexpected results associated with specific parameter values and is a perfect choice for regression testing. 

Base choice testing

Base choice testing is a technique where the selection of test parameters is based on the main app elements. It may include those parameters that have the greatest impact on the functionality or those that are key to its operation. For example, when some values have been added or changed. 

The choice of baselines can help to focus attention on the most important aspects of the system and ensure their correctness. Their use in test scenarios can ensure that critical bugs or flaws in the application are identified.

In our case, there are 3 basic values for each parameter: Out-call for Services, 30 min for Duration, and Pounds for Currencies. In the first test case, we combine all our basic values. For the next step, we select a fixed pair and combine it with all values that have been left from the third parameter. Consequently, we continue combining fixed pairs of basic values and get such a table: 

Base Choice testing example

The base choice testing technique is used when we need to check combinations with key parameters. It’s essential when some new values have been added or changed in the program.

Visualized techniques

Classification tree method

The test design technique, known as the classification tree method, is based on the use of a decision tree and combinatorial techniques to identify test scenarios. It allows the creation of compact and complete test suites for software testing.

The main components of the classification tree are:

  1. Factor identification: input parameters, conditions, and functionality that affect the behavior of the program or system.
  2. Decision tree creation: this tree has a hierarchical structure, where each node represents possible attribute values, and the branches correspond to conditions or rules for transitioning between these values. So, we write the main attributes and draw branches with options that belong to these attributes.
  3. Test scenarios:
    • write the test case numbers on the left side
    • draw the horizontal lines from each of them
    • draw the vertical lines from each of the branches
    • draw the drops/hubs on the line intersections that mean that these values are used in these test cases

It’s highly recommended to use a classification tree method with combinatorial techniques, such as each choice or base choice, in order to avoid arbitrary test case creation with a low level of efficiency. 

Example of Classification tree method in combination with Each Choice testing
Example of Classification tree method in combination with Base Choice testing

To sum up, this technique is effective for testing systems with a large number of possible combinations of functionality and inputs. Advantages of the classification tree method include the ability to create well-structured, compact, and comprehensive test suites covering a wide range of possible conditions and scenarios. 

State transition testing

State transition testing is one of the most famous test design techniques. It’s used not only by Quality Assurance engineers but also by other teams, as it allows to show the logic of program behavior. In general, it can be used to test different system states and transitions between them to identify errors associated with incorrect system behavior. States of the system means some objects, blocks, modules, or pages, while the transitions are actions that should be taken to move from one state to another.

To use this technique, you need to build a scheme, where in circles or ovals, you fix the state or object, and with arrows, you mark the action that represents the transition of the object from one state to another. If your flow has certain conditions, you write them in rectangular frames. Most often, they include some general conditions for passing the flow and also the designation of certain pages where the object is located. If the flow has specific preconditions, then you should put them above the scheme. So, this is an example of the state transition testing  of the discount flow by client role: 

Example of State transition testing

To conclude, state transition testing is helpful in the process of testing systems with complex logic and internal states. It allows the identification of the problems related to transitions between program states. Additionally, it verifies the correctness of the system response to various events or inputs.

Conclusion

All test design techniques are extremely important tools in the QA process, each used selectively based on the specific needs of the project. Combining different techniques can improve both efficiency and test coverage. Therefore, a QA’s main tasks include analyzing requirements, evaluating conditions and resources, making a balanced decision on which test design techniques to use, and then conducting the testing accordingly.

If you are looking for an experienced QA team, explore our Quality Assurance Services.