Testing Simulink models
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, data dictonaries, scaling and much more. Testing Simulink models, Stateflow models, and TargetLink models with the testing tool TPT is very easy.

Besides functional requirements-based testing, TPT supports regression and back-to-back tests between MiL and SiL, as well as structural tests including automatic test case generation of Simulink and TargetLink models.

TPT is compatible with MATLAB since version 7.5, Simulink since version 6.5, with TargetLink as well as with the Simulink Coder and the Embedded Coder.

Workflow of testing Simulink models with TPT
Before executing the test, the interface information and parameters can be automatically imported from the MATLAB workspace, the Simulink model, the Simulink or the TargetLink Data Dictionary. The test frame is generated automatically by TPT and 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 automatically generated as structural test cases by TASMO to meet model coverage.

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 the test cases. You can also record the internal signals of the model for the test assessment.

The tests are started from within TPT that controls the Simulink model in MATLAB during the test execution. Complex tests or test suites can be executed unattended in batch mode, for example overnight.

After the test execution, TPT starts the test assessment based on the collected data. A report of the results is generated.


Automatic test generation for Simulink models and TargetLink models (TASMO)
Using TASMO, test cases for Simulink models 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 coverage of the Simulink model, Stateflow model or TargetLink model respectively. The generated test data can also be used for back-to-back regression tests.

MIL-SIL-PIL regression tests on Simulink models and TargetLink models
Regression tests to verify the code generation with TargetLink, Embedded Coder, or Simulink Coder are easy to perform in TPT. Back-to-back tests are executed automatically. Beside the automatic test case generation using the TPT-feature named TASMO, all functional tests can also executed as Model-in-the-Loop (MIL) and Software-in-the-Loop (SIL). 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.


Advantages of testing Simulink models and TargetLink models with TPT

  1. Compatibility with MATLAB 7.5 and higher, and with Simulink 6.5 and higher
  2. 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)
  3. Full support of Simulink Coder (formerly known as Real-Time Workshop), and Embedded Coder von MATLAB
  4. Automatic analysis of the interface of the Simulink model
  5. Automatic generation of the testframe (test harness) for Simulink and TargetLink
  6. 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
  7. Automatic test case generation (TASMO)
  8. Flexible configuration options by way of m-script support
  9. Control of the coverage measurement of Simulink with the Verification and Validation Toolbox and with TargetLink
  10. Bi-directional exchange of parameters between MATLAB and TPT
  11. Support of different data file formats like *.mat, *.dat, *.mdf, *.csv
  12. Automatic use of internal Simulink model signals or TargetLink signals during the test run
  13. Use of MATLAB m-scripts during test execution and for the test assessment
  14. Testing arbitrary Simulink and TargetLink subsystems
  15. Support of Simulink and TargetLink Data Dictionaries
  16. Tests involving the controller environment
  17. Testing Simulink models that contain continuous parts
  18. Support of AUTOSAR signals
  19. Using TPT together with Simulink Debugger
  20. Back-to-Back regression testing concerning MIL, SIL, PIL, and HIL inclusive automatic code generation
  21. Coverage measurement of models and code (decision coverage, condition coverage, MC/DC)
  22. Informative and configurable test documentation
  23. Linking and tracing of requirements and tests cases
  24. Debugging of Simulink models and tests
  25. Testing safety-critical software eg. according to the safety standard ISO 26262