Annotation Interface Tag


@Tag is a repeatable annotation that is used to declare a tag for the annotated test class or test method.

Tags are used to filter which tests are executed for a given test plan. For example, a development team may tag tests with values such as "fast", "slow", "ci-server", etc. and then supply a list of tags to be included in or excluded from the current test plan, potentially dependent on the current environment.

Syntax Rules for Tags

  • A tag must not be blank.
  • A trimmed tag must not contain whitespace.
  • A trimmed tag must not contain ISO control characters.
  • A trimmed tag must not contain any of the following reserved characters.
    • ,: comma
    • (: left parenthesis
    • ): right parenthesis
    • &: ampersand
    • |: vertical bar
    • !: exclamation point
Since:
5.0
See Also:
Tags, Test
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The tag.
  • Element Details

    • value

      String value
      The tag.

      Note: the tag will first be trimmed. If the supplied tag is syntactically invalid after trimming, the error will be logged as a warning, and the invalid tag will be effectively ignored. See Syntax Rules for Tags.