My TestSuite is running during the build using ant target.
I would like, in my suite, to access the TestResult and do some actions if the tests succeed or not.
Is there a way to retrieve the object in the tear down method?
Thanks
My TestSuite is running during the build using ant target. I would like, in
Share
With jUnit3 I’d try subclassing
Testand overwrite therunmethod. That would provide me with access to theTestResultinstance. Something like this:With jUnit4 I’d look into implementing a TestRunner (based on the standard runner). It sounds difficult but actually isn’t. Subclass the default one and simply add the
@RunWithannotation to use your own runner (that can do something with the results)