Acceptance Test Driven Development (with Gherkin Syntax)

1. It’s not that scary…

2. Quick Tutorial

2.1. Language constructs (basic elements):

2.2. Examples

Feature: Promo Modals
  As an anonymous user
  I want to see promo modals
  So that I can see benefits of becoming ProTipster member

  Scenario: Sign Up link click
    Given I am on the ProTipster home page
    When I click on the sign-up
    Then I should see navigation-link promo modal

  Scenario: Login link click
    Given I am on the ProTipster home page
    When I click on the login
    Then I should see navigation-link promo modal

  Scenario: Tips page Unlock button click
    Given I am on the ProTipster tips page
    When I click on the buy link
    Then I should see unlock promo modal

  Scenario: Pick page Unlock button click
    Given I am on the ProTipster picks page
    When I click on the match
    And I click on the pick
    And I click on the pick unlock
    Then I should see unlock promo modal

With Scenario Outlines:

Feature: Promo Modals
  As an anonymous user
  I want to see promo modals
  So that I can see benefits of becoming ProTipster member

  Scenario Outline: Sign Up link click
    Given I am on the ProTipster <page> page
    When I click on the <element>
    Then I should see <context> promo modal

    Examples:
      | page | element  | context         |
      | home | sign-up  | navigation-link |
      | home | login    | navigation-link |
      | tips | buy link | unlock          |

  Scenario: Pick page Unlock button click
    Given I am on the ProTipster picks page
    When I click on the match
    And I click on the pick
    And I click on the pick unlock
    Then I should see unlock promo modal

much shorter, isn’t it? That’s it!

2.3. What’s next?

Now let us do our magic! Step definitions are for developers.

2.4. Introduction Video for developers