Testng listener to comply with Apache Ant JUnit XML Schema -
as part of testng automation test suite automatically push results jenkins testrail. have plugin installed on jenkins server: https://github.com/jenkinsci/testrail-plugin
the read me states output must comply junit schema: https://github.com/windyroad/junit-schema/blob/master/junit.xsd
i have reference how 1 junit report testng test cases? , added
<listeners> <listener class-name="org.testng.reporters.junitxmlreporter"></listener> </listeners>
to listeners; however, not seem create file in correct format causes jenkins fail message :
uploading results testrail. error pushing results testrail posting index.php?/api/v2/add_results_for_cases/236 returned error! response testrail is: {"error":"field :results cannot empty (one result required)"} build step 'testrail plugin' marked build failure finished: failure
i wondering if there different listener should using instead.
thank help.
i used xsd
file shared in question create testng
reporter complies xsd.
to consume reporter, please add dependency below
<dependency> <groupid>com.rationaleemotions</groupid> <artifactid>junitreport</artifactid> <version>1.0.0</version> </dependency>
this reporter makes use of service loader approach wire in itself. doesn't need added explicitly via <listeners>
tag (or) @listeners
annotation.
details can found here
Comments
Post a Comment