history As a frequent buyer I need to be able to authenticate Scenario: Successfully authenticating with correct credentials Given there is a user “everzet” with password “123” And I am on the login page When I fill in “username” with “everzet” And I fill in “password” with “123” And I press “login” Then I should see “Hello, everzet” 1 2 3
history As a frequent buyer I need to be able to authenticate Scenario: Successfully authenticating with correct credentials Scenario: Can not authenticate with wrong credentials Scenario: Blocked user can not authenticate, even with correct credentials
visitor i need to be able to register on this site Feature: registration benefit role (benefitiar) in order to ... as a ... i need to ... Feature: ... benefit role (benefitiar) in order to ... as a ... i need to ... Feature: ... benefit role (benefitiar) in order to ... as a ... i need to ... Feature: ... benefit role (benefitiar)
... Feature: ... benefit role (benefitiar) in order to ... as a ... i need to ... Feature: ... benefit role (benefitiar) in order to ... as a ... i need to ... Feature: ... benefit role (benefitiar) in order to maintain my shopping history as a site visitor i need to be able to register on this site Feature: registration benefit role (benefitiar) SELECT f.* FROM ‘/features’ as f ORDER BY f.role, f.benefit LIMIT 10 PSEUDOAgileQL
visitor i need to be able to register on this site Feature: registration Scenario: Successful registration when visitor provides all the required info Scenario: Unable to register when visitor misses required info
visitor i need to be able to register on this site Feature: registration Scenario: Successful registration when visitor provides all the required info Scenario: Unable to register when visitor misses required info Scenario: ...
visitor i need to be able to register on this site Feature: registration Scenario: Successful registration when visitor provides all the required info Scenario: Unable to register when visitor misses required info Scenario: ... Scenario: ... Scenario: ... Scenario: ... Scenario: ...
visitor i need to be able to register on this site Feature: registration Scenario: Successful registration when visitor provides all the required info Given I am on homepage And I follow “sign up” When I fill in “email” with “[email protected]” And I fill in “username” with “linkedin” And I fill in “password” with “sha1_without_salt” And I press “register” Then I should see “You have been successfully registered” And I should be on homepage
steps with these snippets: /** * @When /^I fill in “([^”]+)” with “([^”]+)”$/ */ public function iFillInWith($val1, $val2) { throw new PendingException(); } ...
steps with these snippets: /** * @When /^I fill in “([^”]+)” with “([^”]+)”$/ */ public function iFillInWith($val1, $val2) { throw new PendingException(); } ...
iAmOnHomepage() { throw new PendingException(); } /** * @Given /^I follow “sign up”$/ */ public function iFollowSignUp() { throw new PendingException(); } /** * @When /^I fill in “([^”]+)” with “([^”]+)”$/ */ public function iFillInWith($val1, $val2) { throw new PendingException(); }
history as a site visitor i need to be able to register on this site Scenario: Successful registration when visitor provides all the required info Given I am on homepage TODO: write pending definition And I follow “sign up” When I fill in “email” with “[email protected]” And I fill in “username” with “linkedin” And I fill in “password” with “sha1_without_salt” And I press “register” Then I should see “You have been successfully registered” And I should be on homepage 1 scenario (1 pending) 8 steps (7 skipped, 1 pending) 0m0.015s
iAmOnHomepage() { $crawler = new \Some\Crawler\Lib\Crawler(); $crawler->goto(“http://localhost:8080/”); if (200 !== $crawler->getCurrentStatusCode()) { throw new \RuntimeException(‘Can not open homepage’); } }
history as a site visitor i need to be able to register on this site Scenario: Successful registration when visitor provides all the required info Given I am on homepage Can not open homepage And I follow “sign up” When I fill in “email” with “[email protected]” And I fill in “username” with “linkedin” And I fill in “password” with “sha1_without_salt” And I press “register” Then I should see “You have been successfully registered” And I should be on homepage 1 scenario (1 failed) 8 steps (7 skipped, 1 failed) 0m0.015s
history as a site visitor i need to be able to register on this site Scenario: Successful registration when visitor provides all the required info Given I am on homepage And I follow “sign up” TODO: write pending definition When I fill in “email” with “[email protected]” And I fill in “username” with “linkedin” And I fill in “password” with “sha1_without_salt” And I press “register” Then I should see “You have been successfully registered” And I should be on homepage 1 scenario (1 pending) 8 steps (1 passed, 1 pending, 6 skipped) 0m0.015s