validate test-tags
Validates that all tags used in test files (Gherkin features) are defined in the tag contract.
This ensures tag filtering and test selection works correctly by preventing the use of undefined tags that would be silently ignored by godog.
The validation:
- Discovers all Gherkin feature files in the repository
- Extracts all tags from features, scenarios, and examples
- Loads the tag contract from .eac/testing-tags.yml
- Checks that each tag is defined in the contract
- Reports undefined tags with their file locations
Usage: validate test-tags
Expected Output: Displays undefined tags with file locations (path:line).
Tags are validated against .eac/testing-tags.yml contract.
Exit code 0 if all tags defined, 1 if undefined tags found.
What It Checks
- Discovers all
.featurefiles under the specs root. - Extracts all
@tags from features, scenarios, and example tables. - Checks each tag against the tag contract definitions.
- Validates pattern tags with additional rules:
@skip:<reason>-- reason must be a defined skip reason.@deps:<name>-- name must be a registered tool or OS platform (linux,macos,windows).@env:<moniker>-- moniker must be a defined environment.@depm:<module>-- module must be a defined module.
Common Errors
- Undefined tag -- A tag is used but not defined in
.eac/testing-tags.yml. Add the tag definition to the contract. - Invalid skip reason -- A
@skip:tag uses a reason not listed in the contract'sskip_reasons. - Invalid deps name -- A
@deps:tag references a tool not in the tool registry.
See Also
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.