I use gradle and appium for integrationtests. I want to upload the generated junit.xml to an external tool. Therefore i need a specific format of my XML-File.
The problem is that <system-out> is after <testcase>. Instead <system-out> should be inside <testcase>.
At the Moment:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="de.MyTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2024-06-21T08:19:51" hostname="CP21965" time="51.944">
<properties/>
<testcase name="myTestMethod()" classname="de.MyTest" time="51.944"/>
<system-out>
LogStatement1
LogStatement2
LogStatement3
</system-out>
</testsuite>
Goal:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="de.MyTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2024-06-21T08:19:51" hostname="CP21965" time="51.944">
<properties/>
<testcase name="myTestMethod()" classname="de.MyTest" time="51.944">
<system-out>
LogStatement1
LogStatement2
LogStatement3
</system-out>
</testsuite>
The Question is:
I know the junit.xml is generated by gradle. Can i configure where system-out is added in my junit.xml?
I searched in gradle documentation and stack overflow, but found nothing.