Generation of C++ unit tests from abstract state machines specifications
|Titel||Generation of C++ unit tests from abstract state machines specifications|
|Band||Proceedings of the 2018 IEEE 11th International Conference on Software Testing, Verification and Validation Workshops|
According to best practices of model-driven engineering, the implementation of a system should be obtained from its model through a systematic model-to-code transformation. Following the same approach, model-based testing suggests deriving also (unit) tests from abstract models. Previously, we have presented Asm2C++  – a tool that translates Abstract State Machines (ASMs) to C++ code. In this paper, we extend the Asm2C++ tool such that it can now automatically produce unit tests for the generated code. Abstract test sequences, either generated randomly or through model checking, are translated to concrete C++ unit tests using the BOOST library. We also present some experiments that prove the feasibility of the proposed approach.