5.8. Test Result Processing
[TestWatcher](https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/extension/TestWatcher.html)
defines the API for extensions that wish to process the results of test method executions. Specifically, a TestWatcher
will be invoked with contextual information for the following events.
testDisabled
: invoked after a disabled test method has been skippedtestSuccessful
: invoked after a test method has completed successfullytestAborted
: invoked after a test method has been abortedtestFailed
: invoked after a test method has failed
In contrast to the definition of “test method” presented in Test Classes and Methods, in this context test method refers to any @Test method or @TestTemplate method (for example, a @RepeatedTest or @ParameterizedTest ). |
Extensions implementing this interface can be registered at the method level or at the class level. In the latter case they will be invoked for any contained test method including those in @Nested
classes.
Any instances of |