Gherkin Features & Scenarios


 Are used to document business requirements, written in Gherkin script language and stored in text .Feature files. 

The .Feature files should be descriptive enough for each member of the team to understand what is required. So in Gherkin you use feature, rule and scenario Descriptions:


Feature Descriptions:

Describe a single feature of the system or a particular aspect of a feature, providing a high-level description as a 'Shared Understanding' of the requirement for the team including Stakeholders, Analysts, Developers and Testers. Additionally, the feature description should provide some context of the storey, the expected outcome and who is the 'Actor' involved, eg:

Feature: A customer with a bank account in credit wants to withdraw some money from an ATM. The customers account balance will be reduced by the amount of money successfully withdrawn.

Rule Descriptions:

Used to describe business rules, and grouping together Scenarios. 

Scenario Descriptions:

Features can usually be broken down into several scenarios, which in tern should be described using a Context-Action-Outcome format. These should also include concrete examples to illustrate business rules / conditions, and the steps taken to achieve the required outcome. 



.Feature Files - Clear and Concise Reqs.

System Owners & BA's write Gherkin features and add Scenario Outline Example data to show real cases.

.Scenarios - Reusable Detailed Step Def's

Test Analysts and Test Engineers write Scenario Step Definition 'Glue' reusable scripts.


<<<<< Back to Gherkin                                                                                     Forward to Given/When/Then >>>>>