January 2012
Intermediate to advanced
336 pages
8h 12m
English
Remember earlier we said that you can write your Gherkin features in the spoken language of your stakeholders? Here’s how.
Putting a # language: comment on the first line of a feature file tells Cucumber which spoken language that feature is written in. If you omit this header, Cucumber will default to English, as you’ve already seen.
Here’s an example of a feature written in Norwegian:
| | # language: no |
| | Egenskap: Summering |
| | For å unngå at firmaet går konkurs |
| | Må regnskapsførerere bruke en regnemaskin for å legge sammen tall |
| | |
| | Scenario: to tall |
| | Gitt at jeg har tastet inn 5 |
| | Og at jeg har tastet inn 7 |
| | Når jeg summerer |
| | Så skal resultatet være 12 |
If you’re wondering whether Cucumber knows ...
Read now
Unlock full access