Tagged Execution

Tags allow you to filter the specs and scenarios quickly for execution. To execute all the specs and scenarios which are labelled with certain tags, use the following command.

$ gauge --tags tag1,tag2 specs

or,

$ gauge --tags "tag1, tag2" specs

This executes only the scenarios and specifications which are tagged with tag1 and tag2.

Example:

Spec

In the above spec, if all the scenarios tagged with "search" and "admin" should be executed, then use the following command:

$ gauge --tags "search & admin" SPEC_FILE_NAME

Tag expressions

Tags can be selected using expressions. Like:

  • !TagA: Selects specs/scenarios that do not have TagA.
  • TagA & TagB: Selects specs/scenarios that have both TagA and TagB.
  • TagA & !TagB: Selects specs/scenarios that have TagA and not TagB.
  • TagA | TagB: Selects specs/scenarios that have either TagA or TagB.
  • (TagA & TagB) | TagC: Selects specs/scenarios that have either TagC or both the tags TagA and TagB
  • !(TagA & TagB) | TagC: Selects specs/scenarios that have either TagC or do not have both the tags TagA and TagB
  • (TagA | TagB) & TagC: Selects specs/scenarios that either TagA and TagC or TagB and TagC

results matching ""

    No results matching ""