Efficient Test Data Generation for MC/DC with OCL and Search

Hassan Sartaj,Muhammad Zohaib Iqbal,Atif Aftab Ahmed Jilani,Muhammad Uzair Khan
2024-08-02
Abstract:System-level testing of avionics software systems requires compliance with different international safety standards such as DO-178C. An important consideration of the avionics industry is automated test data generation according to the criteria suggested by safety standards. One of the recommended criteria by DO-178C is the modified condition/decision coverage (MC/DC) criterion. The current model-based test data generation approaches use constraints written in Object Constraint Language (OCL), and apply search techniques to generate test data. These approaches either do not support MC/DC criterion or suffer from performance issues while generating test data for large-scale avionics systems. In this paper, we propose an effective way to automate MC/DC test data generation during model-based testing. We develop a strategy that utilizes case-based reasoning (CBR) and range reduction heuristics designed to solve MC/DC-tailored OCL constraints. We performed an empirical study to compare our proposed strategy for MC/DC test data generation using CBR, range reduction, both CBR and range reduction, with an original search algorithm, and random search. We also empirically compared our strategy with existing constraint-solving approaches. The results show that both CBR and range reduction for MC/DC test data generation outperform the baseline approach. Moreover, the combination of both CBR and range reduction for MC/DC test data generation is an effective approach compared to existing constraint solvers.
Software Engineering,Artificial Intelligence
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to automatically generate test data that meets the Modified Condition/Decision Coverage (MC/DC) criteria, especially in avionic systems. Specifically, the paper focuses on how to efficiently and automatically generate test data that meets the MC/DC criteria during the Model - Based Testing (MBT) process to meet the requirements of international safety standards such as DO - 178C. ### Problem Background The safety of avionic systems is of crucial importance and must comply with international safety standards, such as DO - 178C. According to the requirements of DO - 178C, for the highest - level critical applications, testing must be based on the MC/DC criteria. However, manually generating test data that meets the MC/DC criteria is time - consuming and error - prone, so an automated method is required to generate these test data. ### Shortcomings of Existing Methods Currently, model - based test data generation methods mainly rely on constraints written in the Object Constraint Language (OCL) and combine search techniques to generate test data. But these methods either do not support the MC/DC criteria or have poor performance when dealing with large - scale avionic systems. Therefore, a more efficient automated method to generate test data that meets the MC/DC criteria is urgently needed. ### Solutions Proposed in the Paper The paper proposes a new strategy to optimize MC/DC test data generation by using Case - Based Reasoning (CBR) and range - reduction heuristics. The specific steps are as follows: 1. **Constraint Rewriting**: Convert the original OCL constraints into multiple OCL constraints for the MC/DC criteria. 2. **Search Algorithm Optimization**: - Use CBR to find the solution closest to the current problem from the existing solution library as an initial seed to reduce the search space. - Use the range - reduction heuristic to narrow the value range of basic attributes in the original constraints, thereby reducing the number of search steps. 3. **Comprehensive Application**: Combine CBR and range - reduction to further improve the search efficiency. ### Experimental Verification The paper proves the effectiveness of the proposed method through experiments. The experimental results show that the method combining CBR and range - reduction is superior to traditional random search and other constraint solvers (such as UMLtoCSP and PLEDGE) in generating MC/DC test data, especially when dealing with complex constraints. ### Summary The main contribution of this paper is to propose an efficient method to automatically generate test data that meets the MC/DC criteria, thereby helping avionic systems better comply with international safety standards and improving the reliability and safety of the system.