This project is read-only.

How to use SpecFlow Tfs Linker ?

Before reading this tutorial, please make sure you have all needed requirements.

If you have a question, a problem or you found a bug, please use the discussions or issue tab.


  • We work as a development team. We have to develop a Calculator (Yep, a complicated one !).
  • We work in an Agile Project. We have initialized an Agile Project in TFS and we have in the project some Domain Expert and developpers.

1- Create a User Story and Test Cases

Domain Expert have to write specficiations in Gherkin language. They have to write their demands into feature.

  • Open, the TFS project (Throught the Sharepoint website or via Visual Studio).

Create a new User Story

  • In Team Foundation Server, right clic on the project (Here, Calculator) and select “New work item” > “User story”.


Now, you can create your first User Story.

  • Insert a Title which describes the purpose of the feature (eg Create a basic calculator)
  • And describe the feature with this pattern :

In order to <For what purpose I want to do it ?>

As a <What type of User ?>

I want to <What do you want to do ?>

eg :

In order to create a basic calculator

As a Professor

I want to be able to perform basic calculations


  • Clic on Save Work Item.

b. Create Test Case

Now we have a User Story, we can add to it some test case. Each test case will correspond to an automatic acceptance test in SpecFlow.

On the previously created User Story, clic on the “Test Case” tab and clic on the “New” buton.

A new window open. Type the title of the test case. Remenber, a User Story have multiple test case an a test case have to test a unique functionnality of the feature.

  • Just type a title (and a Comment if necessary) and clic “OK”.


eg : “Addtion”.

The test case windows open, clic on the “Resumé” tab.

In the description area, we have to describe, in Gherkin language what we want in this test case. (Given, When and Then statements)

“Given” defines the preconditions

“When” defines what happens

“Then” defines the result of the scenario.

You can add “And” statement to cup in simple sentences the test.

eg :

Given the user "Patrick", type the number "123"

And press the button "+"

And type the number "122"

When Patrick press the button Enter

And whatch the screen result

Then the result in displayed on the screen

And the result is "245"


  • Clic on “Save work Item”.
  • Repeat these steps for each Test case in the user story (Addition, Substraction, Multiplication, …) in order to create a complete test case coverage for a basic calculator.

2. Configure StepflowTfsLinker

3.Use the Extension

Last edited Jul 17, 2011 at 8:05 PM by momo3038, version 4


No comments yet.