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

조회 수: 7 (최근 30일)
Nikhil Boddula
Nikhil Boddula 2021년 5월 22일
답변: Abhas 2023년 6월 19일
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.

답변 (1개)

Abhas
Abhas 2023년 6월 19일
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.

카테고리

Help CenterFile Exchange에서 Results, Reporting, and Test File Management에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by