IT:AD:SpecFlow:HowTo:Write A Scenario

Process

Anyone can write a feature (BA, Client, Tester, Dev). They're simple enough in structure and language (English) that they can be understood by all on the team, without ambiguity.

Feature: Search For Famous People
    Blah...

@mytag
Scenario: A successful test for a well known User
    Given A First name of "Kirk"
    And a last name of "Douglas"
    When I press Search
    Then I should get back a list of one or more hits.
    

Scenario: A successful test for some well known names
    Given The following first and last names:
        | First  | Last  |
        | Bugs   | Bunny |
        | Betty  | Page  |
        | Sophie | Loren |
    When I press Search
    Then I should get back a list of more than one hits.

Scenario: An unsuccessful test for some well known names
    Given The following first and last names:
        | First  | Last    |
        | Sky    | Sigal   |
        | Ali    | Kazoom  |
        | Hans   | Nobody  |
    When I press Search
    Then I should get back a list of with zero entries.

If you are using NUnit and not MSTest (ie a Unit Test framework that supports RowTest), you can run multiple tests in one go, feeding it varied data:

Scenario Outline: My Scenario 
Given I enter <first>
And enter <last>
When when I press Go
Then I should get <result>

Examples:
| first | last | result |
| 1     | 4    | 5      |
| 3     | 4    | 7      |

Feature File Elements

Each File describes a single Feature, and then descrives n+ Scenario's of the use of that feature.