Clear Filters
Clear Filters

How to export all coverage result (including reference model) from test manager using command window?

5 views (last 30 days)
I know in test manager, we can export the web view of the coverage result of the model.
The exported web view colors the model passing the coverage test as green, and the ones not passing as red.
However, when we save the web view of the model, it does not export the coverage result of the reference model inside of the model we are testing, even though we can see the result from the test manager.
How do we export them all out without saving them one by one? Is there a way to do that in the command window?

Answers (1)

Anshuman
Anshuman on 29 Aug 2023
Hi Andy,
To export the coverage results of the reference model along with the model you are testing in MATLAB's Test Manager, you can use the 'sltest.export' function in the command window. This function allows you to export the coverage results programmatically and automate the process.
covData = sltest.load('coverageResult.mat');
Use the 'sltest.export' function to export the coverage results, including the reference model coverage.
sltest.export(covData, 'coverageExport.html');
The 'sltest.export' function will generate an HTML report that contains the coverage results for both the model under test and the referenced model(s) within it.
For more information on the 'sltest.export' function and its usage, you can refer to the MATLAB documentation by typing 'doc sltest.export' in the Command Window.
Hope it helps!

Categories

Find more on Results, Reporting, and Test File Management in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!