Testing and Validation of Simulink Models with Reactis#
RSITR 1.14
December 5, 2024
Build better embedded software faster. Generate tests from Simulink models. Detect runtime errors in Simulink models. Execute and debug Simulink models. Track coverage. Automate functional testing of requirements. Check conformance of code to model.
Abstract#
This white paper discusses how the Reactis®[1] automatic test generation tool may be used to validate Simulink®[2] models of embedded control software and to test for conformance of code to Simulink models. Reactis Tester automatically generates test cases that stress the model. The test generation often uncovers runtime errors in Simulink models. The generated tests aim to maximize coverage with respect to a number of test coverage metrics including Modified Condition/Decision Coverage (MC/DC). Reactis Simulator is a simulation environment for Simulink models that enables the user to execute and debug models and to track coverage during test execution. Reactis Validator enables an engineer to formalize model requirements as assertions and perform an automatic search for requirement violations. Validator performs these checks by thoroughly simulating the model with the goal of violating assertions. When an assertion fails, Validator returns a test that highlights the problem. Test suites generated by Reactis serve as a testing oracle to determine if source code conforms to the behavior of a Simulink model. The Reactis for C Plugin integrates seamlessly with Reactis to offer white-box testing for the C code portions of models (C Caller blocks, S-Functions, and Stateflow custom code). Similarly, the Reactis for EML Plugin offers white-box testing of Embedded MATLAB within a model.