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

gurkencheck A linter for Gherkin feature files.

scenario-size

Limits how many steps a scenario or background may have.

What it does#

A long list of steps is usually a sign the scenario has drifted from describing behaviour into describing clicks. Any limit you leave out falls back to 15.

Turning it on#

Add this to your .gurkencheckrc:

{
  "scenario-size": ["on", {
    "steps-length": {"Background": 5, "Scenario": 10}
  }]
}

Settings#

SettingValueIf you leave it outWhat it does
steps-length.Background number of steps 15 Longest allowed Background.
steps-length.Scenario number of steps 15 Longest allowed Scenario. This applies to Scenario Outlines too.

Examples#

Passes
Feature: Logging in

  Scenario: A known user logs in
    Given I am a known user
    When I log in
    Then I see my dashboard
Fails
# With "Scenario" set to 3:
Feature: Logging in

  Scenario: A known user logs in
    Given I am a known user
    And I am on the login page
    When I fill in my name
    And I fill in my password
    Then I see my dashboard

gurkencheck reports: Element Scenario too long: actual 5, expected 3