Report @Ignore tests in xml reports from JUnit and create report for tests that fail in initialization

Review Request #3571 - Created March 16, 2016 and submitted

Information
Chris Heisterkamp
pants
add-ignore-junit-xml-reports
3044
Reviewers
pants-reviews
gmalmquist, jsirois, zundel
Report @Ignore tests in xml reports from JUnit and create report for tests that fail in initialization

Travis CI: https://travis-ci.org/pantsbuild/pants/builds/116726375

This PR adds @Ignore tests to the TEST_*.xml reports generated by the ConsoleRunner for testing. And generates the xml report when the testSuite fails during initialization. It also adds several test cases for the AntJunitXmlReportListener.

Old report with @Ignored test

<testsuite name="org.pantsbuild.tools.junit.impl.XmlReportFirstTestIngoredTest" errors="0" failures="0" hostname="cheister.local" tests="1" time="0.000278" timestamp="2016-03-17T10:14:47">
<testcase classname="org.pantsbuild.tools.junit.impl.XmlReportFirstTestIngoredTest" name="testXmlPassing" time="0.000177"/>
</testsuite>

to

<testsuite name="org.pantsbuild.tools.junit.impl.XmlReportFirstTestIngoredTest" errors="0" failures="0" skipped="1" hostname="cheister.local" tests="2" timestamp="2016-03-17T01:27:13">
<testcase classname="org.pantsbuild.tools.junit.impl.XmlReportFirstTestIngoredTest" name="testXmlPassing" time="0.000120"/>
<testcase classname="org.pantsbuild.tools.junit.impl.XmlReportFirstTestIngoredTest" name="testXmlIgnored" time="0">
<skipped></skipped>
</testcase>
</testsuite>

For tests that fail during initialization there used to be no TEST-*.xml file created at all, now we'll get a file with one testcase that represents the whole TestSuite and has an error with the stacktrace from the failure.

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Chris Heisterkamp
Eric Ayers
Chris Heisterkamp
Eric Ayers
Stu Hood
Chris Heisterkamp
Eric Ayers
Nick Howard (Twitter)
Chris Heisterkamp
Garrett Malmquist
Eric Ayers
Chris Heisterkamp
Review request changed

Status: Closed (submitted)

Loading...