As part of a testng automation test suite I would like to automatically push results from jenkins to testrail. I currently have this plugin installed on my jenkins server: https://github.com/jenkinsci/testrail-plugin
The read me states the output must comply with the junit schema: https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd
I have reference How do I get one junit report from TestNG for all my test cases? and added
<listeners>
<listener class-name="org.testng.reporters.JUnitXMLReporter"></listener>
</listeners>
to my listeners; however, this does not seem to create a file in the correct format as this causes jenkins to fail with the message :
Uploading results to TestRail. Error pushing results to TestRail Posting to index.php?/api/v2/add_results_for_cases/236 returned an error! Response from TestRail is: {"error":"Field :results cannot be empty (one result is required)"} Build step 'TestRail Plugin' marked build as failure Finished: FAILURE
I am wondering if there is a different listener I should be using instead.
Thank you for the help.