Exhaustive Simulation and Test Generation Using fUML Activity Diagrams
The quality of the specifications used for test generation plays an important role in the quality of the generated tests. One approach to improve the quality of the UML specification is the use of executable models specified using the Foundational Subset for Executable UML Models (fUML) and the Action language for fUML (Alf). Due to their precise semantics, fUML and Alf models can be simulated or executed using an fUML execution engine. However, in order to execute the models exhaustively, one must provide input data required to reach and cover all essential elements not only in the graphical fUML models, but also in the textual Alf code associated with the graphical models. In this paper, we present an approach for exhaustive simulation and test generation from fUML activity diagrams containing Alf code. The proposed approach translates fUML activity diagrams and associated Alf code into equivalent Java code and then automatically generates: (1) input data needed to cover or execute all paths in the executable fUML and Alf models and (2) test cases and test oracle (expected output) for testing the actual implementation of the system under development. We also present a tool chain and demonstrate our proposed approach with the help of an example.
KeywordsfUML Activity diagram Alf Simulation Model-Based Testing Test data generation Eclipse Papyrus Moka
This work has received funding from the Electronic Component Systems for European Leadership Joint Undertaking under grant agreement number 737494. This Joint Undertaking receives support from the European Unions Horizon 2020 research and innovation programme and Sweden, France, Spain, Italy, Finland, the Czech Republic.
- 1.Amellal, S., Kaminska, B.: Scheduling of a control data flow graph. In: 1993 IEEE International Symposium on Circuits and Systems, vol. 3, pp. 1666–1669 (1993)Google Scholar
- 2.Arnaud, M., Bannour, B., Cuccuru, A., Gaston, C., Gerard, S., Lapitre, A.: Timed symbolic testing framework for executable models using high-level scenarios. In: Boulanger, F., Krob, D., Morel, G., Roussel, J.C. (eds.) Complex Systems Design & Management, pp. 269–282. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-11617-4_19CrossRefGoogle Scholar
- 3.Backhauß, S.: Code generation for UML activity diagrams in real-time systems. Master’s thesis, Institute for Software Systems, Hamburg University of Technology (2016)Google Scholar
- 4.Breton, E., Bézivin, J.: Towards an understanding of model executability. In: Proceedings of the International Conference on Formal Ontology in Information Systems - Volume 2001, FOIS 2001, pp. 70–80. ACM (2001)Google Scholar
- 5.Cadar, C., et al.: Symbolic execution for software testing in practice: preliminary assessment. In: Proceedings of the 33rd International Conference on Software Engineering, ICSE 2011, pp. 1066–1071. ACM (2011)Google Scholar
- 7.Fraser, G., Arcuri, A.: EvoSuite: automatic test suite generation for object-oriented software. In: Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, ESEC/FSE 2011, pp. 416–419. ACM (2011)Google Scholar
- 12.Majumdar, R., Sen, K.: Hybrid concolic testing. In: Proceedings of the 29th International Conference on Software Engineering, pp. 416–426 (2007)Google Scholar
- 13.Mellor, S.J., Balcer, M.: Executable UML. A Foundation for Model-Driven Architecture. Addison-Wesley, Boston (2002)Google Scholar
- 14.Micskei, Z., Konnerth, R.A., Horváth, B., Semeráth, O., Vörös, A., Varró, D.: On open source tools for behavioral modeling and analysis with fUML and Alf. In: Bordelau, F., Dingel, J., Gerard, S., Voss, S. (eds.) 1st Workshop on Open Source Software for Model Driven Engineering (2014)Google Scholar
- 16.Planas, E., Cabot, J., Gómez, C.: Lightweight and static verification of UML executable models. Comput. Lang. Syst. Struct. 46, 66–90 (2016)Google Scholar
- 21.Tatibouet, J., Cuccuru, A., Gérard, S., Terrier, F.: Principles for the realization of an open simulation framework based on fUML (WIP). In: Proceedings of the Symposium on Theory of Modeling & Simulation - DEVS Integrative M&S Symposium, DEVS 2013, pp. 4:1–4:6 (2013)Google Scholar
- 22.Yu, L., Tang, X., Wang, L., Li, X.: Simulating software behavior based on UML activity diagram. In: Proceedings of the 5th Asia-Pacific Symposium on Internetware, Internetware 2013, pp. 31:1–31:4. ACM (2013)Google Scholar