Skip to content

Feature

Ahmed Ali edited this page Jan 24, 2016 · 5 revisions

Feature

Is used to describe a business feature and all of its possible scenarios.

In Cucumberish each .feature file can contain only one Feature.

However, a feature can contain one Background, one or more Scenarios, one or more Scenario Outlines and their corresponding Examples.

Each feature and scenario can be tagged.

Example

@booking
Feature: Booking
As I user I want to be able to book one or more ticket and manage my bookings

Background:
    Given there are tickets available
    And user is logged in as "Ahmed"
    Then I added EUR 50 into my balance

@create
Scenario Outline: Book a ticket
    Given it is the tickets screen
    When I tap "Book" button
    Then I enter <NumberOfTikets> into the "Amount" Field
    And I tap "Add" button

Examples:
    | NumberOfTikets |
    |        2       |
    |        1       |
    |        1       |

@delete
Scenario: Delete an order of tickets
    Given it is the tickets screen
    When I tap "My Bookings" button
    And I tap "Delete" button in row 0 in the "Bookings" table
    And I confirm the "Delete" action
    Then the "Bookings" table should have 2 rows
Clone this wiki locally