All Implemented Interfaces:
ExtensionPoint, Describable<TestMode>
Direct Known Subclasses:
JavaParameterizedTestCaseName, JavaTestCaseName

public class JavaClassName extends TestMode
This mode works best with java projects.

Each exclusion/inclusion generates two lines by replacing "." with "/" in the fully qualified test class name and appending ".java" to one line and ".class" to the second line.

It is also able to estimate tests to run from the workspace content if no historical context could be found.

  • Constructor Details

    • JavaClassName

      @DataBoundConstructor public JavaClassName()
  • Method Details

    • isSplitByCase

      public boolean isSplitByCase()
    • useParameters

      public boolean useParameters()
    • getTestEntitiesMap

      @NonNull public Map<String,TestEntity> getTestEntitiesMap(@NonNull hudson.tasks.junit.ClassResult classResult)
      Specified by:
      getTestEntitiesMap in class TestMode
      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
      Description copied from class: TestMode
      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.
      Overrides:
      estimate in class TestMode
      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 String getWord()
      Specified by:
      getWord in class TestMode
      Returns:
      a description of the test entity type that is used for splitting, e.g. "cases"