Conversion Simulink test to xUnit XML format possible?

T
trans_them · Aug 31, 2021 · 1.9K views
Question
Is it possible to export testresults from Simulink test to xUnit XML format?  
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 13, 2026
This walks you through how to leverage the MATLAB Unit Test Runner and plugins to output test results in formats including XML and TAP. To output JUnit XML results, you can use the XMLPlugin.
 
Here's an example:
 
import matlab.unittest.plugins.XMLPlugin;
import matlab.unittest.TestRunner;

suite = testsuite('mySimulinkTestFile.mldatx');
runner = TestRunner.withTextOutput;
runner.addPlugin(XMLPlugin.producingJUnitFormat('myJUnitResults.xml'));
runner.run(suite);

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!