O'Reilly logo
  • Saima Jafri thinks this is interesting:

Gherkin

Gherkin is the language that Cucumber understands; it is a DSL. Gherkin has two major missions: it should have a maintainable documentation that is stakeholder-readable/understandable and it should be programmatically testable.

A feature written in Gherkin is as follows:

Feature: Credit card payment
  As a online shopper
  I want to pay through my Credit card
  So that I can buy stuff online instead of visiting the super market

  Scenario: transaction completed successfully
    Given ...
    When ...
    Then ...
  Scenario: Credit card is ...