You are reading the documentation for gurkencheck 0.0.8. Go to version 0.0.10.

gurkencheck A linter for Gherkin feature files.

no-dupe-scenario-names

Makes sure no two scenarios share a name.

What it does#

Scenario names show up in reports. When two are identical you cannot tell which one failed. You can look for duplicates across the whole project, or only inside each file.

Turning it on#

Add this to your .gurkencheckrc:

{
  "no-dupe-scenario-names": ["on", "anywhere"]
}

Settings#

SettingValueIf you leave it outWhat it does
the value "anywhere" or "in-feature" "anywhere" "anywhere" compares every scenario in the project. "in-feature" only compares scenarios within the same file. This rule takes a single value rather than an object.

Examples#

Passes
Feature: Logging in

  Scenario: A known user logs in
    Given I am a known user

  Scenario: An unknown user is turned away
    Given I am not a known user
Fails
Feature: Logging in

  Scenario: A known user logs in
    Given I am a known user

  Scenario: A known user logs in
    Given I am a known user on a phone

gurkencheck reports: Scenario name is also used in: LoggingIn.feature:3