Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 20
Next »
Gherkin Keywords
All Gherkin keywords are highlighted using colour and bold font
User Story Keywords
The commonly used set of user story keywords (As a, I want to, So that) can be entered in the Feature title section like below:
Tip - user story keywords don’t need to be at the start of the line and you can use either lower or upper case as needed
Tip - you can omit the 'to’ part in the “I want to“ keyword and in the “As a” keyword you can enter either “As a“ or “As an”
Simple Step Parameters
Simple parameters (those that are on the same line as the step keyword) can be highlighted by simply wrapping them in single or double quotes
Scenario Outline Parameters
<> delimited step parameters which are used as part of Scenario Template or Scenario Outline are highlighted automatically in orange
Tip - use autocompletion support to quickly populate Examples table header section with the names of the parameters that you have used in parameterized steps above. Simply press 'Ctrl+Space' to bring up the auto completion menu
Tip - scenario outline parameters are also supported inside tabular step parameters
Doc String Step Parameters
Tip - you can also use 'backtick' characters instead of quotes if required
XML Step Parameters
If you enter 'xml' after the opening chars of a multi line string then any XML that you enter before the closing chars are automatically syntax highlighted
Tags are highlighted in grey colour
Comments are highlighted in grey colour
Tip - comments spanning several lines can be conveniently folded
Questions & Answers
A comment prefix character '#' is used followed by ‘Q`:' or 'A:’ to highlight questions and answers respectively. Or the more elaborate version: “Question:“ and “Answer:”
Tip - you can turn off the showing of gutter icons on the left via an editor menu option shown below
Invalid text
If there is any text that according to the Cucumber Gherkin syntax does not belong to any of the Feature file elements, then it is underlined in red and an error icon is shown in the gutter
Note that such errors to be highlighted the 'Errors' option in the Gutter options drop down menu must be turned on as shown below
Add Comment