gherkin 功能在Gherkin中写道

功能在Gherkin中写道

replication-controller.feature
Feature: Replication Controller
    As a user of Openshift PaaS
    I want to query Pods managed by a replication controller
    So I will get all of then running and with a right setup

    Scenario: All pods are running
	Given I am logged in Openshift as "developer"
	  And access to "oss-pre" namespace
	When query the pods of "apigateway" replication controller
	Then all pods managed by "apigateway" replication controller should have the status equals to "running"

gherkin connecting_users_by_extra_info.feature

connecting_users_by_extra_info.feature
Feature: Connecting users by extra information

  Once a user registers with Find a Player, we want to be able to connect him
  with the people we can detect he knows - especially if they're already on our
  system.

  Once people who others know of join Find a Player, we want to notify those
  people to encourage engagement between them.

  Once players are added to plays, we want to be able to allow users to
  participate within the context of the app, and not have a degraded experience
  due to the organiser inviting the user through one of their auxiluary numbers
  and we already have that number.

  Background:
    Given the following users exist:
      | id | email                  | name         |
      |  1 | current_user@dummy.com | Current User |
      |  2 | other_user@dummy.com   | Other User   |

  Scenario Outline: Connect user by alternative phone number
    Given Current User has <num_devices> devices
    And Current User has registered with only one device
    When Other User has a ContactBookItem for Current User and ContactBookItem has all Current User's devices
    Then ContactBookItem's 'contact_session_id' will equal Current Users's ID

    Examples:
      | num_devices |
      |           1 |
      |           2 |
      |          10 |

gherkin connecting_users_by_extra_info.feature

connecting_users_by_extra_info.feature
Feature: Connecting users by extra information

  Scenario: Connect user by alternative phone number
    Given Current User has <num_devices> devices
    Given Current User has registered with only one device
    When Other User has a ContactBookItem for Current User
    When ContactBookItem has all Current User's devices
    Then ContactBookItem's 'contact_session_id' will equal Current Users's ID

    Examples:
      | num_devices |
      |           1 |
      |           2 |
      |          10 |