I would like to add some attributes in the xml report generated by junit tests to add traceability to my tests
Here's what I would like :
class MyTest{
@Test
@AddAttribute("key","value")
fun myTest()
{
}
}
And then to have this pair ("key","value") added to my report.xml like :
<?xml version='1.0' encoding='UTF-8' ?>
<testsuite name="MyTests" tests="1" failures="0" errors="0" skipped="0" time="20.846" timestamp="2020-07-07T15:07:57" hostname="localhost">
<properties>
<property name="project" value="app" />
</properties>
<testcase name="MyTest" classname="MyTest" time="12.912" key="value" />
</testsuite>
Any ideas ?