BT

Get Started With Behaviour-Driven Development Focusing on the Domain Instead of on the Database

by Jan Stenberg on Jul 09, 2013 |

Start using Behaviour-Driven Development (BDD) when designing an application and focus on the domain instead of the database, Julie Lerman suggests in MSDN Magazine.

BDD lets developers focus on user stories and behaviour in the business domain when building up logic and tests and is often used to define acceptance criteria during discussions with clients, Julie, a Microsoft MVP since 2003, working as a consultant and mentor on the .NET platform, explains. New to BDD, Julie has implemented a small working example using Visual Studio, C# and SpecFlow.

SpecFlow is an open source tool for BDD on the .NET platform and part of the Cucumber family supporting other platforms. They describe a user story with scenarios using Gherkin, a language based on keywords, the most important being Given, When and Then. Julie gives a small example of a scenario:

Given a user has entered information about a customer
When she completes entering more information
Then that customer should be stored in the system

SpecFlow integrates with Visual Studio and can generate and execute tests in order to validate the rules in these scenarios. Starting from a simple user story, Julie uses these tools to create a test project and walks through the steps needed to create and run the tests for the scenarios that describe the user story.

Julies sees herself as a data geek but cares very much about working with clients and understanding their businesses. She therefore believes that Domain Driven Design (DDD) and Behaviour Driven Development are important principles to follow.

More Getting Started guides and documentation can be found on the SpecFlow site.
BDD was developed around 2006 by Dan North who has written both an introduction and about stories from a BDD perspective.
Specification by Example is way of defining requirements closely related to BDD.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT