Interface TestFrameworkAdapter

All Known Implementing Classes:
JUnit4Adapter, JUnit5Adapter, TestNGAdapter

public interface TestFrameworkAdapter
Interface for adapting different test frameworks to work with UnifiedTest. Implementations should handle framework-specific test listener registration and configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name of the test framework this adapter supports.
    boolean
    isApplicable(org.gradle.api.Project project)
    Checks if this adapter is applicable for the given project.
    void
    registerListeners(org.gradle.api.Project project, org.gradle.api.tasks.testing.Test testTask, UnifiedTestResultCollector collector, ConsoleReporter reporter)
    Registers test listeners for the framework with the given project and test task.
  • Method Details

    • isApplicable

      boolean isApplicable(org.gradle.api.Project project)
      Checks if this adapter is applicable for the given project.
      Parameters:
      project - the Gradle project to check
      Returns:
      true if this adapter can be used with the project
    • registerListeners

      void registerListeners(org.gradle.api.Project project, org.gradle.api.tasks.testing.Test testTask, UnifiedTestResultCollector collector, ConsoleReporter reporter)
      Registers test listeners for the framework with the given project and test task.
      Parameters:
      project - the Gradle project
      testTask - the test task to configure
      collector - collector for test results
      reporter - reporter for console output
    • getName

      String getName()
      Gets the name of the test framework this adapter supports.
      Returns:
      the name of the test framework