Frédérick Ros
Senior Manager, aMaDEUS
Dev addict
56%
Software behaviour
must be described
in a user readable manner
Feature: Division In order to avoid silly mistakes Cashiers must be able to calculate a fractionScenario: Regular numbersGivenI have entered 3 into the calculatorAndI have entered 2 into the calculatorWhenI press divideThenthe result should be 1.5 on the screen
Given / When / Then en
Soit / Lorsque / Alors fr
Angenommen / Wenn / Dann de
前提 / もし / ならば ja
...
I CAN HAZ / WEN / DEN en-lol
Scenario: Regular numbersGivenI have entered <a number> into the calculatorAndI have entered <another number> into the calculatorWhenI press divideThenthe result should be <result> on the screenExamples: | a number | another number | result | | 12 | 5 | 7 | | 20 | 5 | 15 |
Background:Givena global administrator named "Greg"Anda blog named "Greg's anti-tax rants"Anda customer named "Dr. Bill"Anda blog named "Expensive Therapy" owned by "Dr. Bill"Scenario: Dr. Bill posts to his own blogGivenI am logged in as Dr. BillWhenI try to post to "Expensive Therapy"ThenI should see "Your article was published."
Given I have entered 3 feature
Given/I have entered (\d+)/do|number| ## Some ruby codeendstep
But other output formats exist ...
Cucumber, c'est bon, mangez-en !