What is Gherkin Validator?
Gherkin Validator checks a Cucumber .feature file against the Gherkin grammar the way a linter would: it parses the document into features, rules, backgrounds, scenarios, steps, examples tables and docstrings, then reports line-numbered errors for structural mistakes β steps outside a scenario, a Scenario Outline with no Examples table, an unclosed docstring, tags or tables in the wrong place, misspelled keywords (with "did you mean" hints) β and warnings for the mistakes BDD teams actually make, like duplicate scenario names, empty scenarios, and Examples columns that never cover a
Common Use Cases
Pre-commit Feature File Checks
Paste a .feature file before pushing a commit and catch structural Gherkin errors that would otherwise surface as confusing Cucumber failures in CI.
Reviewing Pull Requests
When reviewing a teammate's BDD scenarios, validate the file and spot outline/Examples mismatches β the classic "placeholder never filled" bug β in seconds.
Teaching & Onboarding BDD
Show new team members what valid Gherkin looks like: load the sample, introduce errors deliberately, and watch the diagnostics explain the grammar.
Refactoring Test Suites
When renaming scenarios or restructuring rules, use the duplicate-name and empty-scenario warnings to keep the suite clean before it grows further.
How to Use This Tool
- Paste a .feature file into the editor (or start from the sample and edit it)
- Validation runs live as you type β errors and warnings are listed with line numbers
- Fix errors (red) first; review warnings (amber) for outline placeholders and duplicates
- Use the scenario summary table to review structure: kinds, step counts, examples rows
- Click "Copy report" to paste the validation result into a ticket or PR comment
Related Tools
Learn More
- Gherkin Reference β official syntax Cucumber's definitive documentation of the Gherkin grammar: keywords, rules, docstrings, data tables, and Scenario Outline semantics.
- cucumber/gherkin on GitHub The official Gherkin parser implementations and grammar description, including the dialect files for all supported languages.
- Behavior-driven development β Wikipedia The methodology behind Gherkin: specifying behavior through examples before writing the implementation.