×
☰ See All Chapters

Cucumber Feature

  • Each feature file should begin with the Feature keyword.  

  • Feature keyword is used to give title to the group of tests written in the feature file. 

  • Feature keyword should be followed by colon ( : ) to separate the feature tittle.  

  • The text immediately following on the same line as the Feature keyword is the name of the feature, and the remaining lines are its description. 

  • Description of the feature can span multiple lines, can even include empty lines. 

  • Everything until the next Gherkin keyword is included considered as the description. 

  • Example:  

Feature: Title of the feature

  Description of the feature

 

  Description of the feature can span multiple lines, can even include empty lines.

  Everything until the next Gherkin keyword is included considered as the description.

  • Both title and description should not use any other keyword of gherkin. 

  • Feature must be followed by one of the following: 

    • Scenario 

    • Background 

    • Scenario Outline 

 


All Chapters
Author