Class TestMode
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<TestMode>
-
- org.jenkinsci.plugins.parallel_test_executor.testmode.TestMode
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<TestMode>
- Direct Known Subclasses:
JavaClassName
,TestCaseName
public abstract class TestMode extends AbstractDescribableImpl<TestMode> implements ExtensionPoint
Extension point returning a list of test entities either from previous runs or estimated from the workspace.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description TestMode()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Map<String,TestEntity>
estimate(FilePath workspace, TaskListener listener)
This method will be called if no historical test results can be found.static TestMode
fixDefault(TestMode testMode)
static TestMode
getDefault()
abstract Map<String,TestEntity>
getTestEntitiesMap(hudson.tasks.junit.ClassResult classResult)
abstract String
getWord()
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
getTestEntitiesMap
@NonNull public abstract Map<String,TestEntity> getTestEntitiesMap(@NonNull hudson.tasks.junit.ClassResult classResult)
- Parameters:
classResult
- The initial class result- Returns:
- a Map of test entities, keyed by their unique key
-
estimate
public Map<String,TestEntity> estimate(FilePath workspace, @NonNull TaskListener listener) throws InterruptedException
This method will be called if no historical test results can be found. In that case, an estimate can be provided from the workspace content.- Parameters:
workspace
- The current directory where tests are expected to be found.listener
- The build listener if any output needs to be logged.- Returns:
- a Map of test entities, keyed by their unique key
- Throws:
InterruptedException
- if the build get interrupted while executing this method.
-
getWord
@NonNull public abstract String getWord()
- Returns:
- a description of the test entity type that is used for splitting, e.g. "cases"
-
getDefault
public static TestMode getDefault()
- Returns:
- the default implementation for this extension point, if none is defined,
-
-