Indeed JUnit4 doesn't make a special distinction between failures and errors, but as far as I know this is only valid if your test is a "pure" JUnit4 test. If the test "extends TestCase", JUnit4 reports failures and errors just as JUnit3 [1]. Besides, some tools that uses junit also make that distinction (I've tested eclipse junit plugin & ant junit task with JUnit 3 and 4 tests; Surefire seems to differentiate too)

I don't know how these tools tell the differente between failures and errors for pure JUnit4 tests; a possible way would be to check if the exception thrown is an instance of java.lang.AssertionError (if it is, is a failure, if not, an error)

Anyway, AFAIK Jenkins just looks at the junit xml reports generated by those tools, so if the distinction between failure and error is there I think Jenkins should show them

[1] I couldn't find a definitive reference, but these links might help:
http://stackoverflow.com/a/4748044/616413
https://github.com/KentBeck/junit/blob/master/src/main/java/org/junit/internal/builders/JUnit3Builder.java
https://github.com/KentBeck/junit/blob/master/src/main/java/org/junit/internal/builders/AllDefaultPossibilitiesBuilder.java

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to