Class TestExecutionWatcher

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.LifecycleMethodExecutionExceptionHandler, org.junit.jupiter.api.extension.TestExecutionExceptionHandler

    public class TestExecutionWatcher
    extends Object
    implements org.junit.jupiter.api.extension.TestExecutionExceptionHandler, org.junit.jupiter.api.extension.LifecycleMethodExecutionExceptionHandler
    • Constructor Detail

      • TestExecutionWatcher

        public TestExecutionWatcher()
    • Method Detail

      • handleTestExecutionException

        public void handleTestExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                 Throwable throwable)
                                          throws Throwable
        Specified by:
        handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandler
        Throws:
        Throwable
      • handleBeforeAllMethodExecutionException

        public void handleBeforeAllMethodExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                            Throwable throwable)
                                                     throws Throwable
        Specified by:
        handleBeforeAllMethodExecutionException in interface org.junit.jupiter.api.extension.LifecycleMethodExecutionExceptionHandler
        Throws:
        Throwable
      • handleBeforeEachMethodExecutionException

        public void handleBeforeEachMethodExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                             Throwable throwable)
                                                      throws Throwable
        Specified by:
        handleBeforeEachMethodExecutionException in interface org.junit.jupiter.api.extension.LifecycleMethodExecutionExceptionHandler
        Throws:
        Throwable
      • handleAfterEachMethodExecutionException

        public void handleAfterEachMethodExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                            Throwable throwable)
                                                     throws Throwable
        Specified by:
        handleAfterEachMethodExecutionException in interface org.junit.jupiter.api.extension.LifecycleMethodExecutionExceptionHandler
        Throws:
        Throwable
      • handleAfterAllMethodExecutionException

        public void handleAfterAllMethodExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                           Throwable throwable)
                                                    throws Throwable
        Specified by:
        handleAfterAllMethodExecutionException in interface org.junit.jupiter.api.extension.LifecycleMethodExecutionExceptionHandler
        Throws:
        Throwable
      • collectLogs

        public static void collectLogs​(String testClass,
                                       String testMethod)