Class TestNames

java.lang.Object
com.carrotsearch.gradle.buildinfra.testing.TestNames

public final class TestNames extends Object
Helpers for naming tests in reports.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    displayName(org.gradle.api.tasks.testing.TestDescriptor descriptor)
    The test's display name, without the parameter list JUnit Platform appends to method names (e.g.
    static boolean
    isClassSuite(org.gradle.api.tasks.testing.TestDescriptor suite)
    True for the suite of a test class (as opposed to gradle's runners or nested containers).
    static String
    methodName(org.gradle.api.tasks.testing.TestDescriptor descriptor)
    The test's method name, usable in a --tests filter: JUnit Platform reports test names with a parameter list (e.g.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • methodName

      public static String methodName(org.gradle.api.tasks.testing.TestDescriptor descriptor)
      The test's method name, usable in a --tests filter: JUnit Platform reports test names with a parameter list (e.g. testFoo() or testBar(String)[1]), which is stripped.
    • displayName

      public static String displayName(org.gradle.api.tasks.testing.TestDescriptor descriptor)
      The test's display name, without the parameter list JUnit Platform appends to method names (e.g. testFoo() or testBar(String)). Custom display names are left as they are.
    • isClassSuite

      public static boolean isClassSuite(org.gradle.api.tasks.testing.TestDescriptor suite)
      True for the suite of a test class (as opposed to gradle's runners or nested containers).