HSTCG: State-Aware Simulink Model Test Case Generation with Heuristic Strategy
Simulink has gained widespread recognition as a valuable tool for system design. It supports efficient modeling and synthesis of embedded controllers. Test cases can also be automatically generated to simulate and verify the correctness of the Simulink model. Nevertheless, as systems grow increasing...
Gespeichert in:
Veröffentlicht in: | IEEE transactions on software engineering 2024-07, p.1-17 |
---|---|
Hauptverfasser: | , , , , , , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | Simulink has gained widespread recognition as a valuable tool for system design. It supports efficient modeling and synthesis of embedded controllers. Test cases can also be automatically generated to simulate and verify the correctness of the Simulink model. Nevertheless, as systems grow increasingly complex, particularly in terms of their internal states, this complexity poses new challenges for existing model testing methodologies. Traditional techniques such as constraint solving and random search encounter difficulties when attempting to explore the intricate logic embedded within these models.
In this paper, we introduce HSTCG , a state-aware test case generation method for Simulink models with heuristic strategy. HSTCG solves only one iteration of the model each time to get the test input that can cover a target branch, then executes the model once to obtain and update the new model state based on the solved input dynamically. Then, it solves the remaining branches based on the new model state iteratively until all the coverage requirements are satisfied. To improve the efficiency of test case generation, we also designed a heuristic strategy containing heuristic branch searching, repeated state filter and unreached branch filter to minimize the times of constraint solving. We implemented HSTCG and evaluated it on several benchmark Simulink models. Compared to the built-in Simulink Design Verifier and state-of-the-art academic work SimCoTest, HSTCG achieves an average improvement of 55% and 103% on Decision Coverage, 53% and 62% on Condition Coverage and 192% and 201% on Modified Condition Decision Coverage, respectively. We also validated the significant improvement of the heuristic strategy, which can improve the efficiency of test case generation by 62.2% on average. |
---|---|
ISSN: | 0098-5589 1939-3520 |
DOI: | 10.1109/TSE.2024.3428528 |