Filter löschen
Filter löschen

How to export test manager results to a CVT file programmatically?

6 Ansichten (letzte 30 Tage)
Nikhil Boddula
Nikhil Boddula am 22 Mai 2021
Beantwortet: Abhas am 19 Jun. 2023
I'm trying to export generated coverage results to a .CVT file in test manager programmatically. So, I can later import it into the SLDV for report generation.
i could able to generate .mldatx extension file using below: sltest.testmanager.exportResults(obj,path).
please give a reply if you know any other way to do.

Antworten (1)

Abhas
Abhas am 19 Jun. 2023
Hi Nikhil,
The sltest.testmanager.exportResults function you mentioned is the recommended way to programmatically export test results from the Test Manager in Simulink. This function generates a .mldatx file, which is a binary file format for storing test results in MATLAB.
However, importing a .mldatx file into SLDV may not always be straightforward, as the file format is specific to Test Manager. For SLDV to import the coverage results, you will need to convert these .mldatx files into a format that SLDV can recognize, such as the Coverage Results File (.crf) format.
Here's one way to approach this:
  1. Use the sltest.testmanager.exportResults function to export the test results to a .mldatx file.
  2. Use the slcoverage.export function to export the coverage results to a .xml or .mat file format that SLDV can import, for example:
model_name = 'my_model'; % Replace with your model name
result_file = 'my_results.mldatx'; % Replace with your result file name
cov_file = 'my_coverage.xml'; % Replace with your coverage file name
sltest.testmanager.exportResults(model_name, result_file);
slcoverage.export(model_name, cov_file, 'Format', 'xml', 'Report', false);
3. Import the resulting .xml or .mat file into SLDV when generating reports or analyzing coverage data.

Kategorien

Mehr zu Results, Reporting, and Test File Management finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by