-
Notifications
You must be signed in to change notification settings - Fork 219
Tool Support
Several tools recognize Gherkin source (feature files) in a similar way to the Gherkin library itself.
All of the tools below support all of the i18n translations of the Gherkin grammar.
- Cucumber TextMate Bundle
- “vim-cucumber”:
- (Code generator not part of the project)
- Generated Lexer
- Pygments lexer for Gherkin (Used by GitHub).
These tools don’t (yet) support all of Gherkin’s 40 translations. (It would be easy for their maintainers to make them support it – see Tool Developers below).
- cucumber.el – i18n support requested here
- JetBrains RubyMine – i18n support requested here
- Cuke4Vs – i18n support requested here
- Cucumber Netbeans Plugin – i18n support requested here
- Gherkin Editor – i18n support requested here
If you’re developing a tool that understands Gherkin, please make it i18n aware. This is easy if you generate the code that recognises Gherkin keywords. The gherkin Ruby Gem contains all the translations and makes them available via a simple API. Look at the code generators from some of the tools above for examples.
Basing your tool on code generation lets you easily update your tool when Gherkin gets a new language or a synonym is added to an existing one. All it takes is a little bit of Ruby/Rake and an Erb template that uses Gherkin::I18n.keyword_regexp
to generate a Python, Java, C# or whatever file that is part of your tool.
Some tool developers have built-in handling of fragments like In order to
, As a
and I want
. (This is a common narrative style for feature headers). We recommend that you do not try to recognize or highlight this. People should be feee to choose the wording they want. Moreover, we don’t have translations of those fragments, and even if we did, this style is too prescriptive. Gherkin lets you formulate feature narratives how you want, and so whould related tools.