Slide 1

Slide 1 text

Speed

Slide 2

Slide 2 text

YOUR

Slide 3

Slide 3 text

Show

Slide 4

Slide 4 text

Franck

Slide 5

Slide 5 text

Requirements

Slide 6

Slide 6 text

Requirements

Slide 7

Slide 7 text

Each

Slide 8

Slide 8 text

Product

Slide 9

Slide 9 text

Product Owner Development Team Product Backlog writes stories Sprint Backlog Selected by

Slide 10

Slide 10 text

Another (also

Slide 11

Slide 11 text

Failing test Passing test Refactor Test-Driven

Slide 12

Slide 12 text

Unit

Slide 13

Slide 13 text

Unit

Slide 14

Slide 14 text

Acceptance

Slide 15

Slide 15 text

Acceptance

Slide 16

Slide 16 text

Acceptance

Slide 17

Slide 17 text

Introducing Gherkin CC

Slide 18

Slide 18 text

Gherkin

Slide 19

Slide 19 text

Acceptance

Slide 20

Slide 20 text

Acceptance

Slide 21

Slide 21 text

setBrowser('*firefox'); $this->setBrowserUrl('http://login.mittwald.de/'); } public function testLoginWithCorrectCredentialsWorksCorrectly() { $this->url('login.html'); $this->byXPath('//input[@id="login_username"]')->value('123456'); $this->byXPath('//input[@id="login_password"]')->value('supersecret'); $this ->byXPath('//input[@type="submit" and @name="login_password"]') ->clickAndWait(); $this->frame(0); $this->assertContains( 'Welcome to the customer center', $this->byXPath('//body')->text() ); } } ?> Scenario: User login Given I am on "login.mittwald.de" When I fill in "123456" for "username" And fill in "supersecret" for "password" And press "log in" Then I should see "Welcome to the customer center" 24 6 Lines

Slide 22

Slide 22 text

Tools that

Slide 23

Slide 23 text

Cucumber Behat Decym92,

Slide 24

Slide 24 text

Behat Mink Goutte Driver Selenium Driver Web Driver Sahi Driver Zombie Driver Selenium Sahi Zombie

Slide 25

Slide 25 text

Install

Slide 26

Slide 26 text

You

Slide 27

Slide 27 text

Scenario: Registration form Given I am on "index.php?id=512" When I follow "register now!" And I fill in "user_name" with "Max Mustermann" And I fill in "user_email" with "[email protected]" And I attach the file "/Users/mmustermann/max.jpeg" to "user_image" And I press "submit registration" Then I should be on "index.php?id=514" And the response should contain "Thank you ..." And the mailbox "m15273" should contain an email with subject "Your registration"

Slide 28

Slide 28 text

Scenario: Registration form Given I am on "index.php?id=512" When I follow "register now!" And I fill in "user_name" with "Max Mustermann" And I fill in "user_email" with "[email protected]" And I attach the file "/Users/mmustermann/max.jpeg" to "user_image" And I press "submit registration" Then I should be on "index.php?id=514" And the response should contain "Thank you ..." And the mailbox "m15273" should contain an email with subject "Your registration" This

Slide 29

Slide 29 text

Better! Feature: Online registration In order to use the site's personalized features As an anonymous user I want to register to the page. Scenario: Registration is confirmed Given I am on the registration page And I fill in the following: | Full name | Max Mustermann | | Email address | [email protected] | And I upload an image of myself And submit the registration Then I should see a confirmation message And I should receive a confirmation email

Slide 30

Slide 30 text

Feature: Online registration In order to use the site's personalized features As an anonymous user I want to register to the page. Scenario: Registration is confirmed Given I am on the registration page And I fill in the following: | Full name | Max Mustermann | | Email address | [email protected] | And I upload an image of myself And submit the registration Then I should see a confirmation message And I should receive a confirmation email Who

Slide 31

Slide 31 text

Then /^(?:I| ) should receive a confirmation e?mail$/ do # Connect to mailbox and see if mail is actually there. # Throw exception otherwise. end class FeatureContext extends Context { /** * @Then /^(?:|I )should receive a confirmation e?mail$/ */ public function assertRegistrationMailWasReceived() { // Connect to mailbox and see if mail is actually there. // Throw exception otherwise. } }

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

Product Owner Stories

Slide 34

Slide 34 text

Integrate

Slide 35

Slide 35 text

Possible

Slide 36

Slide 36 text

Possible

Slide 37

Slide 37 text

Possible

Slide 38

Slide 38 text

Possible

Slide 39

Slide 39 text

How

Slide 40

Slide 40 text

BDD

Slide 41

Slide 41 text

BDD

Slide 42

Slide 42 text

Bogdan

Slide 43

Slide 43 text

BDD

Slide 44

Slide 44 text

Duncan

Slide 45

Slide 45 text

References Gärtner,