Skip to main content

no-dupe-scenario-names

Disallows duplicate Scenario names. Can be configured to search for duplicates in each individual feature or amongst all feature files.

The default case is testing against all the features (same scenario name in different features will raise an error). If needed the scope can be configured, see the examples to know how it works

Additionally, you can also look for duplicated on Outline Scenarios with variables on the title, just adding -compile suffix to the rule configuration (If you use this option, you need to have a variable on the title of all your Outlines)

Configuration

NameDescription
anywhereSame as the default behaviour, find duplicates along all files.
in-featureSearch for duplicates in each individual Feature (same Scenario name in different Features won't raise an error).
in-ruleSearch for duplicates in each individual Rule (same Scenario name in different Rules won't raise an error).
anywhere-compileFind duplicates along all files, including compiling Outlines.
in-feature-compileSame as in-feature, but including compiling Outlines.
in-rule-compileSame as in-rule, but including compiling Outlines.

Examples

Default behaviour

Same scenario name in different features will raise an error

{
"no-dupe-scenario-names": "error"
}

anywhere

Same as the default behaviour, find duplicates along all files.

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

anywhere-compile

Same as the default behaviour, find duplicates along all files, including compiling Outlines.

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

in-feature

To enable searching for duplicates in each individual feature (same scenario name in different features won't raise an error) you need to configure the rule like this.

{
"no-dupe-scenario-names": [
"error",
"in-feature"
]
}

in-feature-compile

Same as "in-feature", but including compiling Outlines.

{
"no-dupe-scenario-names": [
"error",
"in-feature-compile"
]
}

in-rule

To enable searching for duplicates in each individual rule (same scenario name in different rules won't raise an error) you need to configure the rule like this

{
"no-dupe-scenario-names": [
"error",
"in-rule"
]
}

in-rule-compile

Same as "in-rule", but including compiling Outlines.

{
"no-dupe-scenario-names": [
"error",
"in-rule-compile"
]
}