Class GradleTestListenerWrapper

java.lang.Object
io.github.mov2day.unifiedtest.reporting.GradleTestListenerWrapper
All Implemented Interfaces:
org.gradle.api.tasks.testing.TestListener

public class GradleTestListenerWrapper extends Object implements org.gradle.api.tasks.testing.TestListener
Wrapper class that implements Gradle's TestListener interface and delegates to framework-specific listeners. This allows us to integrate our framework-specific listeners with Gradle's test execution.
  • Constructor Details

    • GradleTestListenerWrapper

      public GradleTestListenerWrapper(UnifiedTestResultCollector collector, ConsoleReporter reporter)
      Creates a new wrapper with the specified collector and reporter.
      Parameters:
      collector - the test result collector
      reporter - the console reporter
  • Method Details

    • beforeSuite

      public void beforeSuite(org.gradle.api.tasks.testing.TestDescriptor suite)
      Specified by:
      beforeSuite in interface org.gradle.api.tasks.testing.TestListener
    • afterSuite

      public void afterSuite(org.gradle.api.tasks.testing.TestDescriptor suite, org.gradle.api.tasks.testing.TestResult result)
      Specified by:
      afterSuite in interface org.gradle.api.tasks.testing.TestListener
    • beforeTest

      public void beforeTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor)
      Specified by:
      beforeTest in interface org.gradle.api.tasks.testing.TestListener
    • afterTest

      public void afterTest(org.gradle.api.tasks.testing.TestDescriptor testDescriptor, org.gradle.api.tasks.testing.TestResult result)
      Specified by:
      afterTest in interface org.gradle.api.tasks.testing.TestListener
    • getCollector

      public UnifiedTestResultCollector getCollector()
      Gets the test result collector.
      Returns:
      the test result collector
    • getReporter

      public ConsoleReporter getReporter()
      Gets the console reporter.
      Returns:
      the console reporter