Is there a way in JUnit to detect within an @After annotated method if there was a test failure or error in the test case?
One ugly solution would b
If you are lucky enough to be using JUnit 4.9 or later, TestWatcher will do exactly what you want.
Share and Enjoy!