views:

4051

answers:

7

We have been using BDD (from Dan North's perspective) as a mechanism to record user acceptance tests and drive development on a couple of projects, with decent success. To date though we have not actually automated the tests themselves.

I am now looking in to automating the tests, but I am not sure which behaviour framework to back. So far NBehave seems to be the forerunner - but are there any others I should be looking at? Is there a clear 'winner' at the moment?

Thanks in advance!

Kevin Trethewey

Driven Software (www.drivensoftware.net)

+1  A: 

Check this blog post and its comments for inspiring ideas: http://haacked.com/archive/2008/08/24/introducing-subspec.aspx .

gius
+2  A: 

There's also Specter, which defines a DSL in Boo to make it all more natural.

Mauricio Scheffer
+7  A: 

I dont think there is a 'winner' really. Other frameworks include SpecUnit.NET project and MSpec is also showing promise with the beginnings of a Gallio adapter. Technically since IronRuby is on the horizon, rSpec may be an option for those prepared to go bleeding edge. NBehave + NSpec might be the eldest framework with the best automation, though I found myself fighting against the overly verbose syntax.

I would check them all out and pick the framework that suits your projects style best. They're all OSS, so its hard to lose, the real benefit is simply in moving to BDD.

Jim Burger
+2  A: 

I'd generally go in favour of NBehave, combined with MbUnit and whichever DI/mocking frameworks you need. It's a fair comment by Jim Burger that NBehave is very verbose, and I find myself using cut-and-paste at times. Still, it works great - I'm using Gallio's ReSharper plug-in, so I just get an extra window showing. Haven't tried it with ccnet yet, though.

Dmitri Nesteruk
+14  A: 

Check out SpecFlow.

It is a tool inspired by Cucumber that aims at providing a pragmatic and frictionless approach to Acceptance Test Driven Development and Behavior Driven Development for .NET projects today.

VisualStudio integration seems especially promising.

jbandi
A: 

Maybe you should take a look at my new framework foor BDD in .NET (early alpha though) : Aubergine

Tom
+1  A: 

StoryQ looks like a nice alternative to NBehave with its Fluent interface. I would definitely check it out.

stankovski