TU Wien logo BIG group logo

Testing fUML Models

As part of our moliz project, we provide a testing framework for validating the functional correctness of UML activities. The testing framework comprises a test specification language for expressing assertions on the execution behavior of activities and a test interpreter for evaluating the specified assertions. The test interpreter is based on our extension of the reference implementation of the virtual machine accompanying the foundational UML (fUML) standard, which is used to execute the activity under test. The execution trace obtained from executing the activity under test is analyzed by the test interpreter to evaluate the specified assertions.

Test Specification Language

In our test specification language, test cases on UML activities are organized in test suites. In a test case, the execution order of activity nodes contained by the activity under test and called activities can be validated (execution order assertion). Furthermore, the runtime state of the executed model can be validated at any point in time of the execution of the activity under test (state assertion). Therewith it is possible to assert not only the input and output of executed activities, but also intermediate states of the executed model. To test different execution scenarios, the test specification language enables the definition of test scenarios consisting of objects that can be provided as input to the activities under test.

Details of the test specification language and its grammar can be found here.

Test Interpreter

The process implemented by the test interpreter for executing and evaluating test cases on UML activities is shown in Figure 1. The test interpreter gets as input the UML model to be tested, as well as the test suite to be evaluated. For each test case defined in the test suite, the interpreter executes the activity under test using the fUML virtual machine and obtains an execution trace representing the execution behavior of this activity. Each assertion defined in the test case is evaluated by analyzing the execution trace. The test verdict comprises the information on which assertions succeeded and which failed.

Test interpreter
Figure 1: Test interpreter for UML activities

Example

To get a more concrete idea of our test specification language, we kindly refer to the automated teller machine example.

User Study

In order to evaluate the ease of use and usefulness of our test framework, we have performed a user study with eleven participants. Details can be found here.

Resources

Publications

  • [DOI] S. Mijatov, T. Mayerhofer, P. Langer, and G. Kappel, “Testing Functional Requirements in UML Activity Diagrams,” in Proceedings of the 9th international conference on tests and proofs (tap’15), 2015, p. 173–190.
    [Bibtex]
    @inproceedings{tap2015,
    author = {Stefan Mijatov and
    Tanja Mayerhofer and
    Philip Langer and
    Gerti Kappel},
    title = {{Testing Functional Requirements in {UML} Activity Diagrams}},
    booktitle = {Proceedings of the 9th International Conference on Tests and Proofs (TAP'15)},
    pages = {173--190},
    year = {2015},
    doi = {10.1007/978-3-319-21215-9_11},
    series = {Lecture Notes in Computer Science},
    volume = {9154},
    publisher = {Springer},
    keywords  = {top}
    }
  • S. Mijatov and T. Mayerhofer, “Challenges of Testing Business Process Models in Intra- and Inter-Organizational Context,” in Joint proceedings of the 1st international workshop on modeling inter-organizational processes (minopro) and 1st international workshop on event modeling and processing in business process management (emov) co-located with modellierung 2014, 2014, p. 73–85.
    [Bibtex]
    @inproceedings{minopro2014,
    author = {Mijatov, Stefan and Mayerhofer, Tanja},
    title = {{Challenges of Testing Business Process Models in Intra- and Inter-Organizational Context}},
    booktitle = {Joint Proceedings of the 1st International Workshop on Modeling Inter-Organizational Processes (MinoPro) and 1st International Workshop on Event Modeling and Processing in Business Process Management (EMoV) co-located with Modellierung 2014},
    year = {2014},
    pages = {73--85},
    publisher = {CEUR-WS.org},
    volume = {1185},
    url = {http://ceur-ws.org/Vol-1185},
    series = {{CEUR} Workshop Proceedings},
    keywords = {workshop}
    }
  • S. Mijatov, P. Langer, T. Mayerhofer, and G. Kappel, “A Framework for Testing UML Activities Based on fUML,” in Proceedings of the 10th international workshop on model driven engineering, verification and validation (modevva) co-located with the 16th international conference on model driven engineering languages and systems (models’13), 2013, p. 1–10.
    [Bibtex]
    @inproceedings{modevva2013,
    author = {Mijatov, Stefan and Langer, Philip and Mayerhofer, Tanja and Kappel, Gerti},
    title = {{A Framework for Testing UML Activities Based on fUML}},
    booktitle = {Proceedings of the 10th International Workshop on Model Driven Engineering, Verification and Validation (MoDeVVa) co-located with the 16th International Conference on Model Driven Engineering Languages and Systems (MODELS'13)},
    year = {2013},
    pages = {1--10},
    publisher = {CEUR-WS.org},
    volume = {1069},
    url = {http://ceur-ws.org/Vol-1069/03-paper.pdf},
    issn = {1613-0073},
    keywords = {model testing, model execution, UML},
    series = {{CEUR} Workshop Proceedings},
    keywords = {workshop}
    }
  • [DOI] T. Mayerhofer, “Testing and Debugging UML Models Based on fUML,” in Proceedings of the 34th international conference on software engineering (icse’12), doctoral symposium, 2012, p. 1579–1582.
    [Bibtex]
    @inproceedings{icseDS2012,
    author = {Tanja Mayerhofer},
    title = {{Testing and Debugging UML Models Based on fUML}},
    booktitle = {Proceedings of the 34th International Conference on Software Engineering (ICSE'12), Doctoral Symposium},
    pages = {1579--1582},
    year = {2012},
    doi = {10.1109/ICSE.2012.6227032},
    publisher = {{IEEE}},
    keywords = {workshop}
    }
  • [DOI] T. Mayerhofer, P. Langer, and G. Kappel, “A Runtime Model for fUML,” in Proceedings of the 7th workshop on models at runtime (mrt) co-located with the 15th international conference on model driven engineering languages and systems (models’12), 2012, p. 53–58.
    [Bibtex]
    @inproceedings{mrt2012,
    author = {Mayerhofer, Tanja and Langer, Philip and Kappel, Gerti},
    title = {{A Runtime Model for fUML}},
    booktitle = {Proceedings of the 7th Workshop on Models at RunTime (MRT) co-located with the 15th International Conference on Model Driven Engineering Languages and Systems (MODELS'12)},
    year = {2012},
    pages = {53--58},
    publisher = {ACM},
    keywords  = {workshop},
    doi = {10.1145/2422518.2422527},
    }