Class TestNameTransformer

java.lang.Object
hudson.tasks.junit.TestNameTransformer
All Implemented Interfaces:
ExtensionPoint

public abstract class TestNameTransformer extends Object implements ExtensionPoint
Allow extensions to transform the class/package/method name for JUnit test cases which will be displayed on the test result page. This is useful for alternative JVM languages like Scala that allow identifiers with invalid characters by encoding them: an extension can decode the identifier so it is displayed correctly.
Since:
1.515
  • Constructor Details

    • TestNameTransformer

      public TestNameTransformer()
  • Method Details

    • transformName

      public abstract String transformName(String name)
      Transform the class/package/method name.
      Parameters:
      name - Class name (may be simple or fully qualified), package name, or method name from a JUnit test.
      Returns:
      The transformed name, or the name that was passed in if it doesn't need to be changed.
    • getTransformedName

      public static String getTransformedName(String name)
    • all

      public static ExtensionList<TestNameTransformer> all()