The “Subsystem_Back_To_Back_Testing.mlx” Live Script (MLX) file attached in the “Subsystem_Back_To_Back_Testing.zip” ZIP file illustrates comprehensive steps to automate the workflow of subsystem Back-To-Back testing. The ZIP contains the following artifacts:
- “Subsystem_Back_To_Back_Testing.mlx” Live Script (MLX) file to demonstrate automation commands
- Test models
- Design model under analysis: "RollAutopilotMdlRef_B2B.slx"
Overview
Back-To-Back testing is done to:
- Compare the results of model-in-loop (MIL) and software-in-the-loop (SIL) simulations
- Analyze the model and code coverage results.
- Back-to-Back testing is recommended in standards such as ISO 26262 and DO-254.
In this answer, subsystem Back-To-Back testing is demonstrated with the following workflows:
- Command (API) Based Automation
- The testing of functions corresponding to atomic subsystems in the code.
- Achieving 100% code and model coverage using:
- Add test cases for missing coverage using Simulink Design Verifier
- Coverage Filtering workflows.
This workflow uses the following MathWorks products and is applicable to releases MATLAB R2022a onwards.
- Embedded Coder
- Simulink Test
- Simulink Design Verifier
- Simulink Coverage