We're Hiring!
Take the next step in your career and work on diverse technology projects with cross-functional teams.
LEARN MORE
Mountain West Farm Bureau Insurance
office workers empowered by business technology solutions
BLOG
12
12
2011

Adding BDD to TFS 2010 Test Cases

Last updated:
7.23.2021

Team Foundation Server 2010 provides functionality for testing applications with built in support for test plan and test case management. In our Agile/Scrum projects, we define all of the Test Cases in our planning meeting to define done for each User Story. When starting new projects, team members often ask is how to format the Test Cases so they are clear. One way we have found to be very useful is to use the same format as found in Behavior Driven Development(BDD). BDD uses a format for communicating Test Cases called Gherkin. The Gherkin format follows the pattern below:

Figure 1 – Given, When, and Then definition

Just like the User Story format (As a [user], I want to be able to do [business process], so that [business value]), we have found the Gherkin format is very useful for teams learning Agile. In fact, these Test Cases can be written for Acceptance/Functional tests and for Unit Tests. When we work with customers and our own projects we install our customized Lunavi Agile Process Template as part of the Lunavi Agile Delivery Process. The Lunavi Agile Process Template is a slightly customized version of the MSF for Agile 5.0 process template. In the Test Case work item, we have added fields for Given, When, and Then. The “Then” should also match the expected result in the test steps.

SNAGHTML3f2b686e_thumb.png
Figure 2 – BDD additions for TFS Test Case Work Item

image_thumb_60.png
Figure 3 – Expected result matches the “Then”

Customizing the TFS Test Case Work Item Templates (WIT) to add these fields is straight forward. In summary, use Test Cases to define done of the User Story and use BDD and Gherkin for the language of the Test Case. Feel free to contact us if you have any questions about these changes or about the Lunavi Agile Delivery Process.

Recent Blog Posts

lunavi logo alternate white and yellow
3.13.2025
3
.
12
.
2025
Unlocking the Power of Azure Managed Services with Lunavi

Cloud computing has become the backbone of modern business, offering agility, scalability, and cost efficiency. But managing cloud environments while keeping costs under control and security airtight? That’s a challenge. Azure Managed Services streamline cloud operations, helping businesses optimize spending, enhance security, and future-proof applications. Lunavi provides the expertise and tools to make it happen—so you can focus on growth instead of IT headaches.

Learn more
lunavi logo alternate white and yellow
2.11.2025
2
.
7
.
2025
The Future of Test Automation: Key Trends Shaping 2025 and Beyond

Software testing has gone from a chore to a game-changer, thanks to automation. But in 2025, sticking to old methods means falling behind. Stay ahead by embracing the future of test automation—let’s explore the key trends shaping what’s next.

Learn more
lunavi logo alternate white and yellow
2.11.2025
1
.
23
.
2025
The Importance of Cross Browser Testing

Making sure users have a smooth experience across all these platforms is crucial for businesses to stay competitive. Cross-browser testing is now a key part of modern development. It helps teams find and fix problems like layout issues, broken features, or slow performance before users are affected. Let’s look at why cross-browser testing matters and explore tools that make it easier to get the job done.

Learn more