28 Oct 2013

Group Session 1: Cucumber and Gherkin

To experiment with specifications written as examples, we will use Cucumber. Or more specifiably, the Java version of it: cucumber-jvm. Here you should concentrate mainly on tool usage: the processes (BDD, Specification by Example) are handled in the theory part.

  • Install cucumber-jvm
  • Learn to use Cucumber and to write Gherkin
  • Demonstrate the tool
  • Prepare two laptops with environment for Cucumber Java development (Java and cucumber-jvm, eclipse(?), project setup where we can start writing scenarios)
Start from
  • http://cukes.info/
  • http://aslakhellesoy.com/post/11055981222/the-training-wheels-came-off (check also the links t the bottom of page)

3 comments:

  1. Here's the feature file of group 1 (if you want to continue working on it):

    Feature: Frontpage
    In order to have more customers
    As a bus transport company owner
    I want to have a fancy web page
    Scenario: Logo on top left of the page
    When user opens a page
    Then user sees the logo on the top left of the frontpage

    Scenario: Newsfeed, 6 recent visible

    Scenario: timetable accessible from frontpage
    Given user opens the frontpage
    And there is the timetable with the 'submit' button
    When user types travel information to timetable
    And user press the 'submit' button
    Then page opens containing showing the timetable.

    Scenario Outline: timetable not accessible
    Given user types
    And user types
    When user presses submit button
    Then user geta
    Examples:
    |departure|destination|error message|
    | |Vantaa |Departure city missing|
    |Vantaa | |Arrival city missing|
    |Vantaa |Vantaa |Departure same as arrival|

    ReplyDelete
  2. And here's the other groups two features:

    testi.feature

    Feature: Frontpage
    Background:
    Given we have page
    Scenario: Logo on top left of the page
    Given we have logo
    And we have page
    When page loaded
    Then show logo on top left of the page

    Scenario: 6 recent news on the page
    Given we have news
    When page loaded
    Then show 6 most recent news on news feed

    Scenario: news feed update
    Given we have a news feed
    When new news available
    Then remove oldest news
    And add new news

    Scenario: contact information for purchasing tickets
    Given we have contact information
    And we have open hours information
    When page loaded
    Then show contact information and open hours

    Scenario: contact information for parcel services
    Given we have phone number for the parcel services
    And we have open hours of the parcel office
    When page loaded
    Then show the contact information and open hours

    Scenario: timetable accessible from front page
    Given we have timetable service
    When button is clicked
    Then show the timetable front page


    Ticket.feature

    Feature: Ticket reservation
    Scenario: Search available connections
    Given we have reservation page
    And we have selected from location
    And to destination
    And date
    When information is confirmed
    Then list all availabSle connections for this selection

    Scenario: Show the available connections
    Given we a list of available connections
    When the page is loaded
    Then show the details

    Scenario: Selecting one connection
    Given the details of a chosen connection
    When user choice is made
    Then display all stops in connection and arrival times

    Scenario: browse connections
    Given a list of price details
    When we make the choice
    Then show the special price

    Scenario: ticket

    ReplyDelete
  3. And here's the presentation material of the experts:

    https://www.dropbox.com/s/thibz96vkz7czer/Cucumber%20%26%20Gherkin.pdf

    ReplyDelete