How can I set the testsuite name attribute in the XML file generated by XMLPlugin.producingJUnitFormat?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am creating a set of unit tests for some code that I am developing. I have been using the Matlab unit test plugins to good effect and generating a JUnit XML output file. However, I would like to set the name attribute of the testsuite to distinguish these tests when viewed in other tools such as Jenkins.
All of the examples that I can see show the name attribute left blank.
< testsuite errors="0" failures="1" name="" skipped="1" tests="3" time="0.0493" >
Is it possible to set this field when using XMLPlugin.producingJUnitFormat with the Matlab TestRunner?
0 comentarios
Respuestas (1)
Neeraj Badamikar
el 22 de En. de 2019
Hello Paul,
While this is currently not available, starting MATLAB R2018a, the Name attribute on a TestSuite node is populated with the name of the test class (or the test function if you are running a function-based test) in the Junit-XML report produced by the MATLAB XMLPlugin, with the child TestCase nodes holding the information about the test points within the test class or function.
But I am still curious to know more details about what you are trying to do.
Are you looking to distinguish tests written in MATLAB from the tests written in other languages while viewing the Jenkins report using the Name as an identifier?
If there was a way to specify the Name for a TestSuite node in the XML report, would you expect it to be the same across all TestSuite nodes?
Would you expect the Name to persist across multiple test runs, with the same or a different suite?
- Thanks
Neeraj
1 comentario
Ver también
Categorías
Más información sobre Testing Frameworks en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!