From 3ba3c1f4e239ec6a051d0c2507caf95dd2074bcf Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Sat, 14 Nov 2015 22:00:07 +0100 Subject: [PATCH] [FEATURE] Introduce "native" languages * Added hint about writing tests in native language, e.g. German, with one example. --- .../local-sonar/anmeldung.feature | 21 +++++++++++++++++++ readme.md | 18 +++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 features/simple-examples/daniel-siepmann/local-sonar/anmeldung.feature diff --git a/features/simple-examples/daniel-siepmann/local-sonar/anmeldung.feature b/features/simple-examples/daniel-siepmann/local-sonar/anmeldung.feature new file mode 100644 index 0000000..dbd71b6 --- /dev/null +++ b/features/simple-examples/daniel-siepmann/local-sonar/anmeldung.feature @@ -0,0 +1,21 @@ +# language: de +Funktionalität: Sonarqube stellt eine Anmeldung zur Verfügung + Um weitere Funktionen anzubieten + Möchte ich mich als Nutzer + Anmelden können + + Szenario: Fehlerhafte Anmeldung + Angenommen ich bin auf "http://localhost:9898/" + Dann folge ich "Log in" + Und ich gebe in das Feld "login" "test" ein + Und ich gebe in das Feld "password" "test" ein + Und ich drücke "Log in" + Dann sollte ich "Authentication failed" sehen + + Szenario: Erfolgreiche Anmeldung + Angenommen ich bin auf "http://localhost:9898/" + Dann folge ich "Log in" + Und ich gebe in das Feld "login" "admin" ein + Und ich gebe in das Feld "password" "admin" ein + Und ich drücke "Log in" + Dann sollte ich "Administrator" sehen diff --git a/readme.md b/readme.md index 745e504..54db0fc 100644 --- a/readme.md +++ b/readme.md @@ -3,9 +3,10 @@ and mink in a basic setup. # Install -1. Clone the repository, or download. -2. Run `composer install` from within the repository. - You can verify with `bin/behat -di` whether Behat works and the language is +1. [Install Composer](https://getcomposer.org/doc/00-intro.md) +2. Clone the repository, or download. +3. Run `composer install` from within the repository. + With `bin/behat -di` you can verify whether Behat works and the language is available to write website tests. ## For non headless browser @@ -39,6 +40,17 @@ Native support is given for Firefox. This repository aims to provide basic support to get you started. For full support contact us or dive deeper on your own. +## Further languages + +English for your tests works out of the box. But it also will provide further +languages, e.g. German. To verify your language exists, run `./bin/behat --lang +de -di`. If it exists, e.g. German in this case, you should get a list of +available definitions. In addition you can run `./bin/behat --story-syntax +--lang de` to get information how to write the stories in your language. + +Note, what the last command points out, you have to add the language at the +beginning, with a leading `#`. E.g.: `# language: de`. + # Further resources - http://docs.behat.org/en/v2.5/