Feature

Each Gherkin file begins with the Feature keyword. This keyword doesn’t really affect the behavior of your Cucumber tests at all; it just gives you a convenient place to put some summary documentation about the group of tests that follow.

Here’s an example:

 
Feature:​ This is the feature title
 
This is the description of the feature, which can
 
span multiple lines.
 
You can even include empty lines, like this one:
 
 
In fact, everything until the next Gherkin keyword is included
 
in the description.

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. You can include any text you like in the description except a line beginning with one ...

Get The Cucumber for Java Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.