amost2018 Bonfanti, Silvia Gargantini, Angelo Mashkoor, Atif

Generation of C++ Unit Tests from Abstract State Machines Specifications

in 14th Workshop on Advances in Model Based Testing (A-MOST), IEEE (2018)

Abstract
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 \asmtocode \citeasm2cpp_nasafm17 -- a tool that translates Abstract State Machines (ASMs) to \cpp code. In this paper, we extend the \asmtocode 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 \cpp unit tests using the BOOST library. We also present some experiments that prove the feasibility of the proposed approach.


[download the pdf file] [DOI]

My sw links