Annotation Interface Feature


@Target(PACKAGE) @Retention(RUNTIME) public @interface Feature
A feature or a story describes the behavior of the build system. You can use a story template or free text to describe the behavior of the system. For each feature, a set of scenarios or tests are defined in the form "Given a context When a specific event happens, then the expected outcomes are as described". The "Given When Then" scenarios are described in unit tests using the features of JUnit5 such as test class and nested classes to document and implement the "Given When" and test methods to realize the "Then" part. The display name annotation is used to produce readable and executable behavior-driven tests.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Return the name of the feature as human-readable information for living documentation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Return the detailed description of the story as human-readable information for living documentation.
    Return the identifier of the feature.
    Return the tags associated with the feature.
  • Element Details

    • value

      String value
      Return the name of the feature as human-readable information for living documentation.
      Returns:
      short summary of the feature in a plain human language
    • description

      String description
      Return the detailed description of the story as human-readable information for living documentation. One could describe a story in this format: As a {user-defined string}, to {user-defined string}, I want to {user-defined string}.
      Returns:
      the story in a plain human language.
      Default:
      ""
    • id

      String id
      Return the identifier of the feature. The identifier can be used for cross-reference and traceability of the requirements.
      Returns:
      identifier of the feature unique in the context of the application domain
      Default:
      ""
    • tags

      String[] tags
      Return the tags associated with the feature. Tags provide domain-specific classification and additional information.
      Returns:
      tags defined in the feature
      Default:
      {}