Test and verification of Simulink and TargetLink models
Testing Simulink, Stateflow and TargetLink models with the testing tool TPT is very easy. Every model that can be run in Simulink, can be tested with the testing tool TPT. It does not matter if the model is made up of few or thousands signals
and blocks. TPT supports functionalities like busses, model referencing, triggered subsystems, scaling and much more.
Besides functional requirements-based testing, TPT supports regression and back-to-back tests,
as well as structural tests including automatic test case generation of Simulink and TargetLink models.
Compatible since MATLAB 7.5 and TargetLink 1.3
TPT is compatible with Simulink and TargetLink, and also with the Simulink Coder and Embedded Coder. Test and verification as Model-in-the-Loop (MiL), Software-in-the-Loop (SiL), and Processor-in-the-Loop (PiL) is supported.
Simulink testing workflow
Before executing the test, interface information and parameters can be automatically imported from the MATLAB workspace, the Simulink model, the Simulink or the TargetLink Data Dictionary. The test-harness will be generated automatically as a Simulink model. The test-harness contains the test driver and a copy of the Simulink or TargetLink model to be tested.
Test cases can be modeled manually as functional test cases, or they can be
generated as structural test cases by TASMO to meet model coverage.
Test are started from within TPT. TPT controls the Simulink model in MATLAB and can exchange parameters.
After the test execution, TPT starts the test assessment based on the collected data. A report of the results is generated.
Executing tests in Simulink
Every aspect of the test execution can be controlled by TPT. This means, TPT starts the appropriate MATLAB version and the Simulink model needed to execute the test. Following up, TPT alters the parameters of the model if necessary. TPT supports arrays and other structured data types, and also Simulink Parameter Objects and Simulink Workspaces.
That way all parameters of the Simulink model can be called up in the TPT test model or can be modified by test cases.
It is also possible to record internal signals of the model that can be used for the test assessment.
The test results are assessed automatically and presented in a report.
Complex tests or test suites can be executed unattended in batch mode, for example overnight.
Automatic test case generation for MATLAB/Simulink and TargetLink models (TASMO)
Using TASMO, test cases for MATLAB/Simulink or TargetLink models can be generated fully automated to fulfill the structural coverage (Condition Coverage, Decision Coverage) of the model. TASMO generates a minimum number of test cases automatically that lead to a maximum structural Simulink, Stateflow and TargetLink model coverage.
The generated test data can also be used for back-to-back regression tests.
MiL-SiL-PiL regression testing for Simulink and TargetLink
Regression tests to verify the code generation with TargetLink, Embedded Coder, or Simulink Coder are easy to perform in TPT and can also be executed automatically. Beside the automatic test case generation using the TPT-feature named TASMO, all functional tests can both be run as Model-in-the-Loop and Software-in-the-Loop. All TPT-assessments can be used for the evaluation of the test; for example the error-tolerant signal comparison
where the quantization introduced by scaling can be taken into account.
Functions and advantages of testing Simulink and TargetLink model with TPT
- Compatibility with MATLAB 7.5 and higher, and with Simulink 6.5 and higher
- Full support of TargetLink 1.3 and higher for Model-in-the-Loop (MiL),
Software-in-the-Loop (SiL), and Processor-in-the-Loop (PiL)
- Full support of Simulink Coder (formerly known as Real-Time Workshop),
and Embedded Coder von MATLAB
- Automatic analysis of the interface of the Simulink model
- Automatic generation of the testframe (test harness) for Simulink and TargetLink
- Test results can be compared by using the back-to-back analysis between
MiL and SiL, or the error-tolerant signal comparison for regression testing
- Automatich test case generation (TASMO)
- Flexible configuration options by way of m-script support
- Control of the coverage measurement of Simulink with the Verification
and Validation Toolbox and with TargetLink
- Bi-directional exchange of parameters between MATLAB and TPT
- Support of different data file formats like *.mat, *.dat, *.mdf, *.csv
- Automatic use of internal Simulink model signals or
TargetLink signals during the test simulation
- Use of MATLAB m-scripts for the test assessment
- Tests of arbitrary Simulink and TargetLink subsystems
- Support of Simulink and TargetLink Data Dictionaries
- Tests of Simulink systems together with system models
of the controller environment
- Tests of Simulink models containing continuous parts
- support of AUTOSAR signals
- Using TPT together with Simulink Debugger
- Back-to-Back Regression testing concerning MiL, SiL, PiL,
and HiL inclusive automatic code generation
- Coverage measurement of models and code
(decision coverage, condition coverage, MC/DC)
- Informative and configurable test documentation
- Linking and tracing of requirements and tests cases
- Debugging of Simulink models and tests
- Tests of safety relevant software eg. according to the safety standard ISO 26262