The Gherkin language(SpecFlow)

Piyathida San-aoun
2 min readFeb 3, 2020

--

what is Gherkin?

  • Business readable domain specific language.
  • Represents tests in natural language, not code
  • Line-oriented
  • Users indepentation to create structure
  • Keywords(e.g. Feature, Scenario)
  • Localised in 40+spoken laguages (French, Bulgaruan, Japanese,etc.)

Features

  • Contain one or more scenarios
  • Group/contain logiclly related test scenarios
  • Represent small, discrete feature of the system
  • Start with “Feature:” keyword
  • Followed by feature name/terse description
  • Optional free text description

Scenario

  • Concrete examples of expected system behaviour
  • Each scenario describes a particular situation
  • Each scenario should be independent and isolate
  • Can represent : Happy paths, Error paths, Edge cases
  • Start with: “Scenario:” keyword
  • Followes by title

Step [Given, When, Then]

Data Table in Steps

Data Driven Scenario Outlines

Backgrounds

--

--

Piyathida San-aoun
Piyathida San-aoun

Written by Piyathida San-aoun

Software Developer Engineer In Test

No responses yet