Abstract
In this paper, we propose a Monte-Carlo test generation method that is able to conduct decision, condition and MC/DC coverage testing for practical Simulink models. To generate a test suite efficiently for models with dozens of thousands blocks, we introduce several techniques. Firstly, we propose using templates of input signals, which characterize shapes of entire waveforms of the signals with a few parameters. By using templates, we can easily generate candidate test cases and reduce a search space to plausible one. Secondly, we propose biased sampling framework to get efficiently test cases meeting uncovered objectives. In the framework, a biased distribution generating new candidate test cases is iteratively refined based on fitness values of the previous candidates. We performed two experiments for each of the techniques and confirmed that they are effective enough for Simulink models which cannot be dealt with a de-facto standard tool SLDV.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
true ane false mean activated and inactivated, respectively.
- 7.
That is, the outcome is in \(\mathsf{DataPorts}(b)\) for a (multi-port) switch block b.
- 8.
For simplicity, we omit trigger conditions in this paper.
- 9.
Additionally, blocks in a subsystem with active-control ports are exercised only if the subsystem is activated. Therefore, we also need to correct a fitness for an objective related to the blocks.
- 10.
For a Boolean argument, its range is treated as [0, 1], and a value greater (resp., less) than a half is interpreted as \(\mathtt{true}\) (resp., \(\mathtt{false}\)).
References
Godefroid, P., Klarlund, N., Sen, K.: Dart: directed automated random testing. In: Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2005, pp. 213–223. ACM, New York (2005)
Pacheco, C., Lahiri, S.K., Ernst, M.D., Ball, T.: Feedback-directed random test generation. In: Proceedings of the 29th International Conference on Software Engineering, ICSE 2007, pp. 75–84. IEEE Computer Society, Washington, DC (2007)
Chen, T.Y., Leung, H., Mak, I.K.: Adaptive random testing. In: Maher, M.J. (ed.) ASIAN 2004. LNCS, vol. 3321, pp. 320–329. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30502-6_23
Sims, S., DuVarney, D.C.: Experience report: the reactis validation tool. In: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, pp. 137–140. ACM, New York (2007)
Satpathy, M., Yeolekar, A., Ramesh, S.: Randomized directed testing (REDIRECT) for Simulink/Stateflow models. In: Proceedings of the 8th ACM International Conference on Embedded Software, EMSOFT 2008, pp. 217–226. ACM, New York (2008)
Matinnejad, R., Nejati, S., Briand, L.C., Bruckmann, T.: Automated test suite generation for time-continuous Simulink models. In: Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, pp. 595–606. ACM, New York (2016)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Tomita, T., Ishii, D., Murakami, T., Takeuchi, S., Aoki, T. (2019). Template-Based Monte-Carlo Test Generation for Simulink Models. In: Chamberlain, R., Taha, W., Törngren, M. (eds) Cyber Physical Systems. Design, Modeling, and Evaluation. CyPhy 2017. Lecture Notes in Computer Science(), vol 11267. Springer, Cham. https://doi.org/10.1007/978-3-030-17910-6_5
Download citation
DOI: https://doi.org/10.1007/978-3-030-17910-6_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-17909-0
Online ISBN: 978-3-030-17910-6
eBook Packages: Computer ScienceComputer Science (R0)