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 TypeMethodDescriptiongetName()Gets the name of the test framework this adapter supports.booleanisApplicable(org.gradle.api.Project project) Checks if this adapter is applicable for the given project.voidregisterListeners(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 projecttestTask- the test task to configurecollector- collector for test resultsreporter- reporter for console output
-
getName
String getName()Gets the name of the test framework this adapter supports.- Returns:
- the name of the test framework
-