Loading

Decision Coverage or Modified Condition


Introduction:

Nowadays everything in the world is being replaced and upgraded with their better and advanced counterparts. From things that are used normally in our day to day life, to complex software and technology, everything is being revamped and enhanced rapidly. However, with these modifications and changes there arises a requirement of proper safety and security, which can guarantee that there will be no negative consequences of all the improvements and changes implemented in the existing objects and software. Similarly, in software industry too, developers and programmers are developing and adding new features and qualities to the existing software, to improve their functionality and effectiveness. Moreover, to ensure that all these modifications are appropriate and safe, they are performing continuous testing throughout the software development process. Decision Coverage/ Modified Condition is one such technique that is used in avionics software development guidance DO-178B and DO-178C to ensure adequate testing of the most critical (Level A) software, which is defined as a software that could provide (or prevent failure of) continued safe flight and landing of an aircraft.

What is Decision Coverage/ Modified Condition?

Decision Coverage/Modified Condition is a type of Code Coverage Analysis, which is used to determine or describe the degree to which the source code of a program is executed when a particular test suit runs. Moreover, Modified Condition/ Decision Coverage (MC/DC) is a method of ensuring adequate testing for safety-critical software. At its core lies the idea that if a choice can be made, all the possible factors and conditions, which contribute to that choice or decision, must be tested.

The Modified Condition/Decision Coverage (MC/DC) enhances the condition/decision coverage criteria by demanding that each condition should be shown to independently affect the outcome of the decision. This kind of testing is performed on mission critical applications, which might lead to great injuries or monetary loss. Designing Modified Condition/ Decision Coverage (MC/DC) requires more thoughtful selection of test cases, which is carried out on a standalone module or integrated components. Hence, Modified Condition/ Decision Coverage (MC/DC) is one of the most reliable forms of testing.

Characteristics of Modified Condition/ Decision Coverage (MC/DC):

Modified Condition/ Decision Coverage (MC/DC) is a specialized form of code coverage analysis that is one of the most reliable forms of testing done on an embedded software. In this type of testing, the independence of a condition is shown by proving that only one condition in the software changes at a time. Moreover, in Modified Condition/ Decision Coverage (MC/DC), it is required that each and every point of entry and exist in the program is invoked or used at least once, and every decision in the program is taken on all possible outcomes at least once. In this context, the decision is a Boolean expression that is composed of conditions and zero or more Boolean operations. Hence, the other characteristics of Modified Condition/ Decision Coverage (MC/DC) that are required while testing a critical software are:

  • All the entry and exit points of the software are invoked.
  • Each and every decision takes all possible outcomes.
  • Each condition in a decision takes every possible outcome.
  • Each condition in a decision is shown to independently affect the outcome of the decision.

Defining Terminologies in Modified Condition/ Decision Coverage (MC/DC):

There are few terminologies used in Modified Condition/ Decision Coverage (MC/DC), which define its characteristics and functionalities. Each of these terminologies has a significant role and meaning, and they specify the importance of the whole process. Therefore, to understand their significance both of these terminologies are defined below:

  1. Condition:
    • This is a Boolean expression containing no Boolean operators.
    • Also, if a condition appears more than once in a decision, each occurrence is a distinct condition.
    • It cannot be broken down into simpler Boolean expressions.
    • For Example: A > B
  2. Decision:
    • It is a compound Boolean expression, which is composed of conditions and zero or more Boolean operators. (AND, OR).
    • A decision without a Boolean operator is a condition.
    • For Example: (A > B or (C = B and D = H))

Importance of Decision Coverage/ Modified Condition:

The Modified Condition/ Decision Coverage (MC/DC) criterion enhances the condition/decision coverage criterion, as it requires that each condition should be shown to independently affect the outcome of the decision. The independence requirement ensures that the effect of each condition is tested relative to the other conditions. However, achieving Modified Condition/ Decision Coverage (MC/DC) involves more thoughtful selection of the test cases. Even though it demands thoughtful selection, the importance of Modified Condition/ Decision Coverage is immense, as it is the main structural testing criterion required for mission critical software system, which is needed by the DO-178B and DO-178C standards. Other factors that make Decision Coverage/ Modified Condition important are:

  • In practice it is faster and more reliable than any other forms of software testing.
  • The Modified Condition/ Decision Coverage (MC/DC) form of code coverage analysis allows one to test more quickly, eliminate retesting areas and ensures that each section of the code is working perfectly to optimize the safety of the avionics system it is used on.
  • It ensures that every loop, path and sequence of the software is executable and every parameter has a value.
  • Also, it makes sure that every function operated properly and won’t cause a malfunction.
  • With the assistance of Modified Condition/ Decision Coverage (MC/DC) testing solutions one can validates that their product is reliable and safe.
  • Additionally, Modified Condition/Decision Coverage (MC/DC) is intended to assure, with a high degree of confidence, that the verification process has shown that each condition in each decision in the source code has the proper effect.

Conclusion:

One of the types of Code Coverage Analysis, Modified Condition/ Decision Coverage (MC/DC) is essential for critical software testing. It ensures that adequate testing is done for safety-critical software and that if a choice can be made, all the possible factors (conditions) which contribute to that choice (decision) must be tested. This not only makes Modified Condition/ Decision Coverage (MC/DC) a reliable way of testing a critical software, but it also ensures that every loop, path and sequence of the software is executable and every parameter has a value.

Modified Condition/ Decision Coverage (MC/DC) focuses on the avionics industry's DO-178B standard and validates that all Level A embedded software meets its requirements. When implemented properly, this type of code coverage analysis allows tests to move quickly, eliminating retesting of areas and ensuring that each section of the code is working as per their intended tasks. In short, the aim of Modified Condition/ Decision Coverage (MC/DC) is to examine every possible condition and outcomes that will assist the tester in eliminating all the risks thoroughly, which further ensures that every function operates properly and does not cause any malfunction.