![]() ![]() ![]() Of a software feature, and to group related scenarios. The purpose of the Feature keyword is to provide a high-level description Gherkin is localised for many spoken languages each has their own localised equivalent of these keywords. There are a few secondary keywords as well: Scenario Outline (or Scenario Template).Given, When, Then, And, But for steps (or *).The only exceptions are the free-form descriptions placed underneath Example/ Scenario, Background, Scenario Outline and Rule lines. KeywordsĮach line that isn’t a blank line has to start with a Gherkin keyword, followed by any text you like. That should not be followed by one, your test(s) will be ignored. Please note that some keywords are followed by a colon ( :) and some are not. The trailing portion (after the keyword) of each step is matched to Then the Breaker must guess a word with 5 characters Given the Maker has started a game with the word "silky" Then the Maker waits for a Breaker to join Here is an example: Feature: Guess the word They begin with zero or more spaces,įollowed by a hash sign ( #) and some text.īlock comments are currently not supported by Gherkin.Įither spaces or tabs may be used for indentation. Most lines in a Gherkin document start with one of the keywords.Ĭomments are only permitted at the start of a new line, anywhere in the feature file. Each keyword is translated to many spoken languages Gherkin uses a set of special keywords to give structure and meaning toĮxecutable specifications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |