Capture testcase for unknown test failures in the JUnit Xml

Review Request #4377 - Created Nov. 15, 2016 and submitted

Information
Chris Heisterkamp
pants
report-unknown-testcase-failures
4054
Reviewers
pants-reviews
stuhood, zundel
Capture testcase for unknown test failures in the JUnit Xml

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

When the Mockito test runner comes across a mock that is unneeded it calls the test listener with a test failure for an unknown test case name. We want to capture these failures as testcases in the xml output.

e.g.

Following stubbings are unnecessary (click to navigate to relevant line of code):
  1. -> at com.example.SampleTest.setUp(SampleTest.java:63)
Please remove unnecessary stubbings or use 'silent' option. More info: javadoc for UnnecessaryStubbingException class.
    at org.mockito.internal.exceptions.Reporter.formatUnncessaryStubbingException(Reporter.java:838)
    at org.mockito.internal.junit.UnnecessaryStubbingsReporter.validateUnusedStubs(UnnecessaryStubbingsReporter.java:34)
    at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:49)
    at org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:104)
Eric Ayers
Chris Heisterkamp
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as f4f732dba7d1b3564a2cde4ad99f3aafbd0a96aa

Loading...