Annotation Type TestGroup


  • @Documented
    @Retention(RUNTIME)
    @Target(ANNOTATION_TYPE)
    @Inherited
    public @interface TestGroup
    A test group applied to an annotation indicates that a given annotation can be used on individual tests as "labels". The meaning of these labels is mostly application-specific (example: Nightly which indicates slower, more intensive tests that are skipped during regular runs).

    RandomizedRunner collects groups from all tests in a suite. A group can be enabled or disabled using boolean system properties (or test hooks in the code). A test case is executed if it has no groups or if all of its groups are enabled.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean enabled
      Is the group enabled or disabled by default (unless overridden by test group filtering rules).
      java.lang.String name
      The name of a test group.
      java.lang.String sysProperty
      System property used to enable/ disable a group.
    • Element Detail

      • name

        java.lang.String name
        The name of a test group. If not defined, the default (lowercased annotation name) is used.
        Default:
        ""
      • sysProperty

        java.lang.String sysProperty
        System property used to enable/ disable a group. If empty, a default is used:
         tests.name
         
        Default:
        ""
      • enabled

        boolean enabled
        Is the group enabled or disabled by default (unless overridden by test group filtering rules).
        Default:
        true