20

I'm trying to find out all available syntax/format in Gherkin, such as about multiline argument and everything else I don't know yet.

After digging Google search results though, it seems that the comprehensive guide is located in here:

I thought that was pretty good, and it has a link to a page that supposedly describes multiline arguments and others, but it took me to 404 Not found instead =(.

Does anybody have better suggestion on where to read up about this?

EDIT: to stress that I've done so many Google searches. It gives some rather good sites like specflow and cuke4ninja, but none of them gives comprehensive description of Gherkin. If someone finds an answer to this through Google search, then please feel free to call me a Googling noob and suggestions to improve are welcome.

iTech
  • 18,192
  • 4
  • 57
  • 80
ryaner
  • 3,927
  • 4
  • 20
  • 23

4 Answers4

6

It's not free, but The Cucumber Book has a complete guide to Gherkin.

Disclaimer: I'm a co-author of the cucumber book.

Matt Wynne
  • 136
  • 1
  • 1
6

The best place I know of to understand the Gherkin language is the wiki that you link to. However, as you found there's sometimes a broken link there. What I tend to do is to click the "Pages" link at the bottom of the gray bar with all the GitHub links in it. That takes you to an alphabetical listing of all the wiki pages, including this one for Multiline Step Arguments.

Andy Tinkham
  • 1,329
  • 8
  • 9
  • ugh.. @Jason's link 404's, but theres some good stuff at https://cukes.info/docs/reference#step-arguments , though there are a number of sections marked #todo – ptim Apr 24 '15 at 05:48
2

Gherkin syntax can be checked on Behat website where you can also check examples for PHP language.

xyz
  • 2,277
  • 2
  • 25
  • 41
2

The BNF grammar understood by Cucumbe is available online. The JBehave project also published an EBNF grammar of the language which can be used for writing .feature files.

Frerich Raabe
  • 90,689
  • 19
  • 115
  • 207
  • Where are those Treetop files in cucumber codebase? Having hard time to locate them. – akostadinov Oct 13 '14 at 08:49
  • 1
    The Gherkin BNF grammar page seems to have disappeared off the wiki, sadly. However the Gherkin grammar in .berp format can be found in the source: https://github.com/cucumber/gherkin/blob/39201f20ffe5aef5eedc491a0466f0c67e2a8d0b/gherkin.berp – ngm Apr 06 '16 at 13:12