Testing Models of Reactive Systems
Testing models of modern Real-time Embedded (RTE) systems is not straightforward due to timing constraints, numerous if not infinite possible behaviors, and complex communications between components. Software testing tools and approaches that can generate test cases to test these systems are therefore important. Many of the existing automatic approaches support testing at the implementation level only. The existing model-level testing tools either treat the model as a black box (e.g., random testing approaches) or have limitations when it comes to generating complex test sequences (e.g., symbolic execution). This thesis presents different test case generation techniques for models developed in UML-RT, a UML profile and a domain specific language for modeling RTE systems. We present a novel approach and tool support for automatic unit testing of UML-RT models by conducting concolic testing, a hybrid testing technique based on concrete and symbolic execution. Our technique conducts automatic concolic testing in two phases. In the first phase, the model is isolated from its environment, transformed to a testable model and integrated into a test harness. In the second phase, the harness tests the model concolically and reports the test execution results. To make the test case generation efficient for UML-RT models, we present a novel slicing technique and its tool support. The slicer takes the input model and a criterion, and constructs a slice by taking into account the input criterion. The slice contains only those (behavioral and structural) elements of the original model that depend on the input criterion. Therefore, a slice is possibly a smaller model (compared to the original model) that can make the test case generation more efficient. We describe implementations of each of the techniques in the context of PapyrusRT, an open source Model Driven Engineering (MDE) tool based on the modeling language UML-RT, and report the results of applying our techniques to a set of benchmark models to validate our approach.