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
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