Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of a scenario written in Gherkin Pirate

From what I can see, Gherkin supports many different languages including Pirate

Could someone list an example of the keywords in pirate and what a scenario may sound like or know of a site that has some example listed?

like image 867
Mark Pearl Avatar asked Jul 31 '12 16:07

Mark Pearl


People also ask

What is a gherkin scenario?

Gherkin is a plain-text language with a simple structure. It is designed to be easy to learn by non-programmers, yet structured enough to allow concise description of test scenarios and examples to illustrate business rules in most real-world domains.

How do you write a cucumber scenario?

In Cucumber, an example is called a scenario. Scenarios are defined in . feature files, which are stored in the src/test/resources/hellocucumber directory (or a subdirectory). One concrete example would be that Sunday isn't Friday.

What is scenario and scenario outline in cucumber?

Scenario Outline It is also defined as "Scenario outlines are used when the same test is performed multiple times with a different combination of values." The keyword scenario outline can also be used by the name Scenario Template. In other words, the keyword Scenario Template is a synonym of scenario outline.


1 Answers

To get a full list of keywords, simply run cucumber --i18n en-pirate

Currently this returns:

  | feature          | "Ahoy matey!"            |
  | background       | "Yo-ho-ho"               |
  | scenario         | "Heave to"               |
  | scenario_outline | "Shiver me timbers"      |
  | examples         | "Dead men tell no tales" |
  | given            | "* ", "Gangway! "        |
  | when             | "* ", "Blimey! "         |
  | then             | "* ", "Let go and haul " |
  | and              | "* ", "Aye "             |
  | but              | "* ", "Avast! "          |
  | given (code)     | "Gangway"                |
  | when (code)      | "Blimey"                 |
  | then (code)      | "Letgoandhaul"           |
  | and (code)       | "Aye"                    |
  | but (code)       | "Avast"                  |

Also try cucumber --i18n help to see all other possible languages (including Scouse and Australian...)

like image 192
Jon M Avatar answered Sep 20 '22 22:09

Jon M