top of page

What is Gherkins ?

Updated: Jul 17, 2021

Gherkin is the language that is used by the Cucumber tool. It is a simple English representation of the application behavior. The language, in which this executable feature files is written, is known as Gherkin. it’s meant to describe use cases for a software system in a way that can be read and understood by almost anyone.


Keywords in Gherkin

Feature  : Defines a particular feature that we will test
Scenario : Describe a particular scenario
Given    : Describe the prerequisites of a test scenario
When     : Specify what an operation to be peformed
Then     : Expected outcome of the test
And      : Further condition to be tested 
Background :to run a scenario as a precondition for other scenario
Examples : To achieve data driven approach
Since, Cucumber 6 few new keywords have been added 
Business Need : an alternative to "Feature"
Rule : used to group your scenarios by business rule inside a feature file
Example :An alternative to "Scenario"




Localisation

Gherkin is localised for many spoken languages . In order to allow Gherkin to be written in a number of languages, the keywords have been translated into multiple languages. To improve readability and flow, some languages may have more than one translation for any given keyword.


Conclusion:


Gherkin and Cucumber can be a good choice when you need everyone on the team to be clued in without digging into technical aspects.

Comments


Subscribe to Testing Acharya 

Thanks for submitting!

  • Twitter
  • Facebook
  • Linkedin

@2021-TestingAcharya

bottom of page