Class JunitListener

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestWatcher, org.junit.platform.launcher.TestExecutionListener

    public class JunitListener
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.TestWatcher, org.junit.platform.launcher.TestExecutionListener
    JUnit 5 extension for Testomat.io integration. Reports JUnit test execution results to Testomat.io platform. Provides global execution lifecycle hooks via TestExecutionListener.
    • Constructor Summary

      Constructors 
      Constructor Description
      JunitListener()  
      JunitListener​(MethodExportManager methodExportManager, io.testomat.core.runmanager.GlobalRunManager runManager, JunitTestReporter reporter, io.testomat.core.propertyconfig.interf.PropertyProvider provider, io.testomat.core.artifact.client.AwsService awsService)
      Constructor for testing
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)  
      void testAborted​(org.junit.jupiter.api.extension.ExtensionContext context, java.lang.Throwable cause)  
      void testDisabled​(org.junit.jupiter.api.extension.ExtensionContext context, java.util.Optional<java.lang.String> reason)  
      void testFailed​(org.junit.jupiter.api.extension.ExtensionContext context, java.lang.Throwable cause)  
      void testPlanExecutionFinished​(org.junit.platform.launcher.TestPlan testPlan)  
      void testPlanExecutionStarted​(org.junit.platform.launcher.TestPlan testPlan)  
      void testSuccessful​(org.junit.jupiter.api.extension.ExtensionContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.junit.platform.launcher.TestExecutionListener

        dynamicTestRegistered, executionFinished, executionSkipped, executionStarted, reportingEntryPublished
    • Constructor Detail

      • JunitListener

        public JunitListener()
      • JunitListener

        public JunitListener​(MethodExportManager methodExportManager,
                             io.testomat.core.runmanager.GlobalRunManager runManager,
                             JunitTestReporter reporter,
                             io.testomat.core.propertyconfig.interf.PropertyProvider provider,
                             io.testomat.core.artifact.client.AwsService awsService)
        Constructor for testing
        Parameters:
        methodExportManager - the method export manager
        runManager - the global run manager
        reporter - the JUnit test reporter
        provider - the property provider
    • Method Detail

      • beforeAll

        public void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
      • beforeEach

        public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
        Specified by:
        beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
      • testDisabled

        public void testDisabled​(org.junit.jupiter.api.extension.ExtensionContext context,
                                 java.util.Optional<java.lang.String> reason)
        Specified by:
        testDisabled in interface org.junit.jupiter.api.extension.TestWatcher
      • testSuccessful

        public void testSuccessful​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        testSuccessful in interface org.junit.jupiter.api.extension.TestWatcher
      • testAborted

        public void testAborted​(org.junit.jupiter.api.extension.ExtensionContext context,
                                java.lang.Throwable cause)
        Specified by:
        testAborted in interface org.junit.jupiter.api.extension.TestWatcher
      • testFailed

        public void testFailed​(org.junit.jupiter.api.extension.ExtensionContext context,
                               java.lang.Throwable cause)
        Specified by:
        testFailed in interface org.junit.jupiter.api.extension.TestWatcher
      • afterEach

        public void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
      • testPlanExecutionStarted

        public void testPlanExecutionStarted​(org.junit.platform.launcher.TestPlan testPlan)
        Specified by:
        testPlanExecutionStarted in interface org.junit.platform.launcher.TestExecutionListener
      • testPlanExecutionFinished

        public void testPlanExecutionFinished​(org.junit.platform.launcher.TestPlan testPlan)
        Specified by:
        testPlanExecutionFinished in interface org.junit.platform.launcher.TestExecutionListener