Exhaustive Simulation and Test Generation Using fUML Activity Diagrams

  • Junaid IqbalEmail author
  • Adnan Ashraf
  • Dragos Truscan
  • Ivan Porres
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11483)


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.


fUML 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. 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. 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). Scholar
  3. 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. 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. 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
  6. 6.
    Daw, Z., Cleaveland, R.: Comparing model checkers for timed UML activity diagrams. Sci. Comput. Program. 111, 277–299 (2015). Special Issue on Automated Verification of Critical Systems (AVoCS 2013)CrossRefGoogle Scholar
  7. 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
  8. 8.
    Gay, G.: Generating effective test suites by combining coverage criteria. In: Menzies, T., Petke, J. (eds.) SSBSE 2017. LNCS, vol. 10452, pp. 65–82. Springer, Cham (2017). Scholar
  9. 9.
    Gessenharter, D., Rauscher, M.: Code generation for UML 2 activity diagrams. In: France, R.B., Kuester, J.M., Bordbar, B., Paige, R.F. (eds.) ECMFA 2011. LNCS, vol. 6698, pp. 205–220. Springer, Heidelberg (2011). Scholar
  10. 10.
    Harrison, W., Barton, C., Raghavachari, M.: Mapping UML designs to Java. SIGPLAN Not. 35(10), 178–187 (2000)CrossRefGoogle Scholar
  11. 11.
    Kahn, A.B.: Topological sorting of large networks. Commun. ACM 5(11), 558–562 (1962). Scholar
  12. 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. 13.
    Mellor, S.J., Balcer, M.: Executable UML. A Foundation for Model-Driven Architecture. Addison-Wesley, Boston (2002)Google Scholar
  14. 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
  15. 15.
    Mijatov, S., Mayerhofer, T., Langer, P., Kappel, G.: Testing functional requirements in UML activity diagrams. In: Blanchette, J.C., Kosmatov, N. (eds.) TAP 2015. LNCS, vol. 9154, pp. 173–190. Springer, Cham (2015). Scholar
  16. 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
  17. 17.
    Rojas, J.M., Vivanti, M., Arcuri, A., Fraser, G.: A detailed investigation of the effectiveness of whole test suite generation. Empirical Softw. Eng. 22(2), 852–893 (2017). Scholar
  18. 18.
    Samuel, P., Mall, R.: Slicing-based test case generation from UML activity diagrams. ACM SIGSOFT Softw. Eng. Notes 34(6), 1–14 (2009)CrossRefGoogle Scholar
  19. 19.
    Selic, B.: The less well known UML. In: Bernardo, M., Cortellessa, V., Pierantonio, A. (eds.) SFM 2012. LNCS, vol. 7320, pp. 1–20. Springer, Heidelberg (2012). Scholar
  20. 20.
    Störrle, H.: Semantics and verification of data flow in UML 2.0 activities. Electron. Notes Theor. Comput. Sci. 127(4), 35–52 (2005)CrossRefGoogle Scholar
  21. 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. 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

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Junaid Iqbal
    • 1
    Email author
  • Adnan Ashraf
    • 1
  • Dragos Truscan
    • 1
  • Ivan Porres
    • 1
  1. 1.Faculty of Science and EngineeringÅbo Akademi UniversityTurkuFinland

Personalised recommendations