Annotation Type AfterScenario


  • @Target(METHOD)
    @Retention(RUNTIME)
    public @interface AfterScenario
    Methods annotated with this hook, execute after every scenario execution completes. The scenario can be filtered by passing additional attributes.

    If there is more than one method annotated with @AfterScenario, the order of execution is as follows:

    • Hooks which are not filtered by tags.
    • Hooks filtered by tags.
    If there is more than one hook of these categories, they are executed in reverse alphabetical order based on method names.
    • Element Detail

      • tags

        String[] tags
        Returns:
        Array of tags to filter which scenarios the hook runs after.
        Default:
        {}
      • tagAggregation

        Operator tagAggregation
        Returns:
        OR: if hook should run for a scenario containing any of the tags provided AND: if hook should run for a scenario containing all of the tags provided Default is AND
        Default:
        com.thoughtworks.gauge.Operator.AND