BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

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

| by Jan Stenberg on Jul 09, 2013. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login 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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT