Extracting Reusable Test Cases from Modified MATLAB Simulink Model

변경된 MATLAB Simulink 모델로부터 재사용 가능 테스트 케이스 도출

  • Received : 2018.11.30
  • Accepted : 2018.12.28
  • Published : 2019.06.30


This paper proposes a reusable test case extraction technique for modified MATLAB Simulink/Stateflow (SL/SF) model. Creating test cases for complicated SL/SF model like ECU(Electrical Control Unit) of automotive, requires a lot of time and effort. An intuitive way to reduce to create new test cases whenever the model changes, is to reuse some test cases which have been generated for the original model. In this paper, we propose a method to define reusable test cases in SL/SF after defining model behavior and judging model equality by test cases. The proposed technique is evaluated using a commercial automotive controller model.

JBCRJM_2019_v8n6_235_f0001.png 이미지

Fig. 1. Example of Model before Modification(M1), Modified Model(M2)

JBCRJM_2019_v8n6_235_f0002.png 이미지

Fig. 2. Test Case Reuse Procedure

JBCRJM_2019_v8n6_235_f0003.png 이미지

Fig. 3. Model before Modification

JBCRJM_2019_v8n6_235_f0004.png 이미지

Fig. 4. Modified Model

JBCRJM_2019_v8n6_235_f0005.png 이미지

Fig. 5. Simple Model Behavior of Model before Modification

JBCRJM_2019_v8n6_235_f0006.png 이미지

Fig. 6. Simple Model Behavior of Modified Model

JBCRJM_2019_v8n6_235_f0007.png 이미지

Fig. 8. Simple Behavior of Model before Modification

JBCRJM_2019_v8n6_235_f0008.png 이미지

Fig. 7. Comparison of Model Structure before and after Modification

JBCRJM_2019_v8n6_235_f0009.png 이미지

Fig. 10. Comparison of Model of before and after Modification

JBCRJM_2019_v8n6_235_f0010.png 이미지

Fig. 11. Full Behavior of Model before Modification

JBCRJM_2019_v8n6_235_f0011.png 이미지

Fig. 12. Full Behavior of Model after Modification

JBCRJM_2019_v8n6_235_f0012.png 이미지

Fig 9. Simple Behavior of Modified Model

Table 1. State DB of Model before Modification and Modified Model

JBCRJM_2019_v8n6_235_t0001.png 이미지

Table 2. Transition DB before and after Modification

JBCRJM_2019_v8n6_235_t0002.png 이미지

Table 3. Specification of Control Model used in the Experiment

JBCRJM_2019_v8n6_235_t0003.png 이미지

Table 4. Evaluation of Test Case Reusability by Control Model

JBCRJM_2019_v8n6_235_t0004.png 이미지


Supported by : 국방과학연구소


  1. H. Liu and H. B. Kuan Tan, "Covering Code Behavior on Input Validation in Functional Testing," Information and Software Technology, Vol.51, No.2, pp.546-553, 2009.
  2. S. Nidhra and J. Dondeti, "Blackbox and Whitebox Testing Techniques-A Literature Review," Int. J. Embed. Syst. Appl. (IJESA), Vol.2, No.2, 2012.
  3. C. D. Nguyen, A. Marchetto, and P. Tonella. "Combining Model-based and Combinatorial Testing for Effective Test Case Generation," In ISSTA, pp.100-110, 2012.
  4. R. Svenningsson, H. Eriksson, J. Vinter, and M. Törngren, "Model-Implemented Fault Injection for Hardware Fault Simulation," Model-Driven Engineering, Verification, and Validation (MoDeVVa), pp.31-36, 2010.
  5. J. Yang, J. Bauman, and A. Beydoun, "A Systems Engineering Approach to Verification of Distributed Body Control Applications Development," SAE Technical Paper 2010-01-2328, 2010.
  6. S. Guo, J. Zhang, W. Tong, and Z. Liu, "An Application of Ontology to Test Case Reuse," International Conference on Mechatronic Science, Electric Engineering and Computer, pp.19-22, 2011.
  7. Y. Dong, Y. Wang, M. F. Lau, and S. Y. Lin, "Experiments on Test Case Reuse of Test Coverage Criteria," in Ubiquitous Intelligence Computing and 7th International Conference on Autonomic Trusted Computing (UIC/ATC), 7th International Conference on, pp.277-281. 2010,
  8. Y. Dong, M. F. Lau, and S. Y. Lin, "On Partitioning the Domain for Test Case Reusability," The Eighth International Conference on Quality Software, pp.264-269, 2008.
  9. A. B. Hocking, J. Knight, M. Aiello, and S. Shiraishi, "Proving model equivalence in model based design," in Software Reliability Engineering Workshops (ISSREW), 2014 IEEE International Symposium on, pp.18-21, 2014.
  10. SimDiff [Internet], Inc.
  11. K. C. Shashidhar, M. Bruynooghe, F. Catthoor, and G. Janssens, "Functional Equivalence Checking for Verification of Algebraic Transformations on Array-intensive Source Code," Proc. DATE'05, pp.1310-1315, 2005.
  12. K. C. Shashidhar, M. Bruynooghe, F. Catthoor, and G. Janssens, "Verification of Source Code Transformations by Program Equivalence Checking," International Conference on Compiler Construction, pp.221-236, 2005.
  13. Mahapatra, S., Egel, T., Hassan, R., Shenoy, R. et al., "Model-Based Design for Hybrid Electric Vehicle Systems," SAE Technical Paper 2008-01-0085, 2008.
  14. S. Mohalik, A. A. Gadkari, A. Yeolekar, K. Shashidhar, and S. Ramesh, "Automatic Test Case Generation from Simulink/Statefiow Models using Model Checking," Software Testing Verification and Reliability, Vol.24, No.2, pp.155-180, 2014.
  15. MATLAB Simulink Coder [Internet],, Inc.
  16. MATLAB Design Verifier [Internet],, Inc.
  17. A. Sridhar, D. Srinivasulu, and D. P. Mohapatra. "Model-based Test-case Generation for Simulink/Stateflow using Dependency Graph Approach," In 2013 3rd IEEE International Advance Computing Conference (IACC), pp.1414-1419. 2013.
  18. H. G. Park, K. H. Chung, and K. H. Choi, "Test Case Generation For Simulink/Stateflow Model Using Yices and Model Information," KIPS Transactions on Software and Data Engineering, Vol.6, pp.293-302, 2017.