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.
  • Constructor Details

    • TestMode

      public TestMode()
  • Method Details

    • 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,
    • fixDefault

      public static TestMode fixDefault(TestMode testMode)