What is Gherkin and how can it help the business analyst?

Gherkin is a structured natural language that is used by business analysts to specify how they want the system to behave for given scenarios. The Gherkin language is simple.  It uses about 10 keywords (Given, When, Then, And, But, Scenario, Feature, Background, Scenario Outline, Examples) which allow the language to be read and parsed by an automation tool called Cucumber.

Gherkin has a few high-level benefits:

1) Business Friendly Language: Gherkin is a simple to understand language using a limited number of keywords.  It's simplicity and natural style make it easy for business people to read and understand.

2) Requirement Traceability: It's used to write acceptance tests with a focus on system behavior.  Each acceptance test links to a scenario and feature which allows it to be traced back to the original requirements.  This is particularly evident with Agile methods that use short user stories combined with acceptance tests to define the requirements. 

3) Test Automation: As a structured language using keywords, Gherkins is machine readable with the automation tool called Cucumber.  Developers write executable code for each step of the Gherkin acceptance test resulting in fully automated test scenarios.

4) Team Communication: With such a strong focus on defining acceptance tests business analyst, QA, and developers find themselves working more closely together to define, build, and test their applications.  The Gherkin acceptance test become a powerful and precise communication tool.

Chris Adams
LinkedIn Profile

posted @ Monday, October 9, 2017 1:59 PM by Chris Adams