required-tags
Requires each scenario to carry certain tags.
What it does
Useful when every scenario has to be traceable, for example to a ticket number. Each entry is a pattern, and a scenario must have at least one tag matching it.
Turning it on
Add this to your .gurkencheckrc:
{
"required-tags": ["on", {
"tags": ["^@issue-\\d+$"],
"ignoreUntagged": false
}]
}
Settings
| Setting | Value | If you leave it out | What it does |
|---|---|---|---|
tags |
list of regular expressions | empty list |
Each pattern must be matched by at least one tag on the scenario. |
ignoreUntagged |
true or false | true |
When true, scenarios with no tags at all are left alone. Set it to false to require tags everywhere. |
Examples
Passes
Feature: Logging in
@issue-42
Scenario: A known user logs in
Given I am a known user
Fails
Feature: Logging in
@smoke
Scenario: A known user logs in
Given I am a known user
gurkencheck reports: No tag found matching ^@issue-\d+$ for Scenario