Tags

Group features and scenarios with Tags

Tags are a great way to organize your features and scenarios. Cucumber features and scenarios can contain Tags marked with @. Tags can be used to run Subset of Scenarios.

   @checkout
    Feature: Checkout Cart

        @checkout_as_guest
        Scenario: Fred check out the item as a guest user
            Given hello

        Scenario: More other checkouts
            Given hello

A feature or scenario can have as many tags as you like. Separate them with spaces:

   @checkout @checkout_guest @checkout_registered
    Feature: Checkout Cart

Tags can be placed above the following Gherkin elements:

  • Feature
  • Scenario
  • Scenario Outline
  • Examples

Development Process

Another creative way to use tags is to keep track of where in the development process a certain feature is:

@qa_ready
Feature: Index projects


Given When ThenRun Locally