Gherkin

Gherkin image
Gherkin is a domain-specific language (DSL) used primarily in behaviour-driven development (BDD) to define test cases in a human-readable format. It's the language that Cucumber, a popular BDD tool, uses to specify the behaviour of software systems. Gherkin's syntax is designed to be easily understood by both technical and non-technical team members, promoting collaboration and clear communication about requirements.

The Cucumber Book by Matt Wynne and Aslak Hellesøy (2012, p7), says that Gherkin is a list of steps for a Cucumber test to work through, and so are the criteria used to test the work.

Example:
Feature: User Login
Scenario: Successful Login
Given the user is on the login page
When the user enters valid credentials
Then the user should be logged in
Explore MoT
Leading With Quality Lean Coffee image
Quality leadership conversations in a virtual lean coffee format
MoT Software Testing Essentials Certificate image
Boost your career in software testing with the MoT Software Testing Essentials Certificate. Learn essential skills, from basic testing techniques to advanced risk analysis, crafted by industry experts.
This Week in Quality image
Debrief the week in Quality via a community radio show hosted by Simon Tomes and members of the community
Subscribe to our newsletter
We'll keep you up to date on all the testing trends.