This project is read-only.

Scenario files

The bare minimum

The minimal useful text you can put into a scenario file is
Given I am not logged in
When I log in as Morgan with a password secretPassword
Then I should see a message, "Welcome, Morgan!"

You may also use And if you have more than one Given, When or Then in your scenario.

Naming scenarios

You probably want to name your scenario which you can do like this
Scenario: Successful login
  Given I am not logged in
  When I log in as Morgan with a password secretPassword
  Then I should see a message, "Welcome, Morgan!"

Multiple scenarios

You can of course have multiple scenarios in the same text file

Story (or Feature)

To describe your story you write the following
Story: Login

Scenario: Successful login
  Given I am not logged in
  When I log in as Morgan with a password secretPassword
  Then I should see a message, "Welcome, Morgan!"

You may replace Story with Feature if that suits you better.
There's also room for a narrative for your story, it must currently be in As a x, I want y, So that z
Story: Login
  As a x
  I want y
  So that z 

Scenario: Successful login
  Given I am not logged in
  When I log in as Morgan with a password secretPassword
  Then I should see a message, "Welcome, Morgan!"

Last edited Nov 25, 2009 at 10:00 PM by Lazydev, version 1

Comments

No comments yet.