What is the purpose of mcdc software testing

What is the purpose of mcdc software testing

Condition coverage is not just for developers

Many testers are using or considering test design techniques. This allows them to decrease the effort in their testing while still gaining valuable insight into the quality of software and systems. To make it easier to choose the right technique for specific situations, testers often categorize the options and available literature.

Read apso: popular tool used in agile software development

White-box testing for structure and black-box for specifications

The white-box technique supports the creation of test cases that are based on a certain structure. Developers are the only ones who use these techniques. Black-box techniques, on the other hand, allow for the creation of test cases that are based on some type of specification or requirements. This is a great fit for business testers, as they rely on specifications and requirements to demonstrate that the system works as expected.

This black-and white differentiation isn’t a good idea and certainly not the correct way to look at things. Although categorizations can be helpful in that they facilitate our conversations and help us focus on the design of test cases, categorizations should not be used as a guideline. Today, professional testers combine or incorporate the relevant techniques in exploratory testing.

Expand your perspective: White box’s “condition coverage” for everyone

Let’s take a look at condition coverage, one of the so-called “white box” techniques. This will broaden the scope of business testers. This technique allows for more detailed testing of complex conditions, which are the rules that govern a decision in control flow graphs. We will be looking at control flow diagrams, which represent the structure of code or a part of an architecture. However, we also know that control flow graphs have similar syntax elements to business processes. Statements are activities and decisions are… guess what… decisions. Therefore, the business process itself allows us to use white-box techniques such as decision coverage or statement coverage. The underlying rules for the decision points in business processes may contain multiple conditions.

Coverage measures, derived from the white-box methods, are often explained in a theoretical and almost scientific way. These techniques are difficult to comprehend, so they are rarely used. MCDC is a particularly difficult technique. Modified Condition Decision coverage (MCDC) is one of the condition coverage methods. This powerful technique reduces test cases from 2 N to 1 N+1. N is the number atomic conditions. The individual conditions that make up an atomic condition are called atomic conditions. When the complex condition is “A>18 and B60”, the atomic conditions are “A>18 and B60”.

Advantages of the mcdc modified conditions decision coverage

MCDC is much easier to use than, e.g. Decision tables because it uses the same approach as e.g. to determine the minimum set of test cases. Decision tables use the approach of defining the maximum number of possible test case and then reducing them in a structured way.

MCDC believes that the rule of thumb for designing test cases is to have each of the atomic condition in the complex conditions contribute to a false result and one to a true result for this condition. This means that changing the value or atomic conditions directly will result in a change of the complex condition’s result.

Let’s look at the complex condition A and B.

We are left with 3 test cases (N+1), instead of 4 (2 N).

To apply this method to more complex conditions, we use a trick to quickly find the corresponding combinations. We first analyze A and B, then B and C. If the complex condition is too long, we will continue with the same steps as for the subsequent pairs.

To cover the whole complex condition, we need to still add values for the atomic conditions “A”, in the “test case” 4 – 6, and “C”, in the “test case” 1 – 3. (printed in red).

The following rule should be followed:

The analyzed relation can be combined with another atomic condition using an “AND”-relation. However, with an “OR”, we would add “1”, so that the complex condition outcome is not changed.

We can reduce the doubles.

We are left with N+1 and 4 test cases.

This same approach can be used to help us in situations that include AND/OR and possibly brackets. These are the results:

Completing the gaps as needed:

Let’s get rid of those doubles!

You can continue to this method if the number of atomic condition is greater. In that case, you will have N+1 test cases instead of 2 n cases.

Conclusion

It is a great support system for testers in general. The tester can decide what test design techniques to use to improve not only their coverage but also their profession. If the testing profession is reduced by the use of these categories, we should stop using them. The use of categories should not be considered a science, but a support tool.

MCDC can be used in many cases to make decisions more quickly and effectively than other methods, such as decision tables. We can all be open to the ideas and techniques available in our community without worrying about the barriers some may still put up.

Leave a Reply

Your email address will not be published. Required fields are marked *