Annotation Type Story


@Target(TYPE)
@Retention(RUNTIME)
@Testable
@ExtendWith(StoryExtension.class)
public @interface Story
Represents a story in BDD or specification by example style of writing tests. Notice that the annotation is meta-annotated with JUnit 5 built-in "@Testable" annotation. This annotation gives IDEs and other tools a way to identify classes and methods that are testable––meaning the annotated class or method can be executed by a test engine like JUnit 5 Jupiter test engine.
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    java.lang.String value
    Returns the name of the story as human readable information for living documentation.
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    java.lang.String description
    Returns the detailed description of the story as human readable information for living documentation.
    java.lang.String id
    Returns the identifier of the story.
    java.lang.String[] tags
    Returns the tags associated with the feature.
  • Element Details

    • value

      java.lang.String value
      Returns the name of the story as human readable information for living documentation.
      Returns:
      short summary of the story in a plain human language.
    • description

      java.lang.String description
      Returns 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}, in order to {user-defined string}, I want to {user-defined string}.
      Returns:
      the story in a plain human language.
      Default:
      ""
    • id

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

      java.lang.String[] tags
      Returns the tags associated with the feature. Tags provides domain specific classification and additional information.
      Returns:
      tags defined in the feature
      Default:
      {}