Need structured import/export for Test Sequence steps and tabular test results output for traceability.

7 views (last 30 days)
We have two important questions regarding Simulink Test functionalities to improve our testing workflow:
1. Importing/Exporting Test Sequence Steps and Transitions (excluding detaching method)
In our workflow, we frequently update test harnesses as models evolve, but the core test logic often remains unchanged. Currently, we manually recreate or copy test steps and transitions between test sequences, which is time-consuming and error-prone.
We are not referring to detaching and reattaching Test Sequence blocks. Instead, we’re seeking a structured method to export and import test sequence steps and transitions, such as using Excel, XML, or other formats, to enable reuse across projects.
Is there a supported or recommended workflow/tool to export/import complete test sequences (steps + transitions) in a structured format?
2. Exporting Actual Test Results in Textual/Tabular Format
Simulink Test primarily generates graphical signal comparison plots in test reports. However, for traceability and integration with tools like Polarion, we require step-wise or time-point-wise actual results in textual/tabular formats—for example, signal values and pass/fail verdicts in CSV or Excel.
Is there a way to configure Simulink Test to output results in plain text or tables (e.g., CSV, Excel) instead of only plots?
This feature would significantly enhance documentation and regulatory compliance.

Answers (1)

Deepak
Deepak on 26 Jun 2025
Hi @Sayan,
Simulink Test does not currently offer a direct, built-in feature to export or import entire Test Sequence steps and transitions in structured formats like Excel or XML. However, this can be done using MATLAB scripting via the "sltest.testsequence" API. You can programmatically read steps and transitions from a Test Sequence block, save them in a structured format (e.g. CSV or XML), and later recreate them in another model using the same API. This approach avoids manual duplication and enables reusability across projects, especially when test logic remains consistent while models evolve.
For exporting test results in tabular or textual form, Simulink Test allows access to detailed simulation results via the Test Manager API and the Simulink Data Inspector (SDI). You can extract signal data and pass/fail verdicts programmatically and export them to CSV or Excel using standard MATLAB functions. This provides a clear, structured output suitable for traceability and integration with tools like Polarion, making it easier to meet documentation and regulatory compliance needs.
Please find attached the relevant documentation for reference:
I hope this helps.

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!