- Use the sltest.testmanager.exportResults function to export the test results to a .mldatx file.
- Use the slcoverage.export function to export the coverage results to a .xml or .mat file format that SLDV can import, for example:
How to export test manager results to a CVT file programmatically?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Abhas
el 19 de Jun. de 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:
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.
0 comentarios
Ver también
Categorías
Más información sobre Generate Tests en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!