Is there any way I can get the test result in the teardown (@After
) method? I\'d like to do clean up after the tests depending on the result.
Could not
The closest thing to what you're asking for would probably be the TestWatcher rule. That won't give you access to a returned result or anything, but you can use it (or create your own TestRule and combined with the Description object, you could annotate your methods differently to indicate what sort of clean-up is necessary.