If your not running the latest builds from the build server, you might want to grab this latest stable for a few new goodies!

Some highlights include .NET 4.0 builds, more gherkin support, an improved console runner and the stable parts of the Visual Studio plugin we have been blogging about. A big thanks to John and Morgan for their hard work on this.

Update: Looks like John and myself blogged at the same time, to save your RSS feed two posts we’ve merged Johns post below:

NBehave 0.5 has just been released into the wild. The full release notes are available here, but there have been changes relating to most aspects of BDD style development:

Scenario processing: embedding table data into scenarios; having scenario outlines that get executed multiple times against a set of example data; comments into scenarios; language support

Scenario execution: run scenarios through TestDriven.Net; run scenarios from VS2010 using the NBehave plugin; support for config files

Scenario development: generate empty step methods using the command line

Documentation: more code examples are shipping with the release now

Unit test support: the fluent syntax is back, for those devs who want to use NBehave within a unit test framework

.Net 4.0 support, as well as .Net 3.5

This is quite a feature-packed release, so I will be posting more details on individual features over time. For now though, you can grab the download from the Codeplex site. Note that to get the VS 2010 plugin you will need to download and run the released exe file. Enjoy!

We’ve been hard at work improving the plug-in, and now is a good time to make it available. Please bear in mind this is still work in progress, and we really need your feedback both on stability and features.

I’ve been using NBehave for a long time now on various projects, usually using it’s fluent syntax. I wanted to move to using text based scenarios but unfortunately unless you like dropping to the command line to run your tests you were out of luck.

Now there is the wonderful looking SpecFlow, and I would be doing a disservice to the community if I didn’t mention it. It’s a very complete and increasingly popular framework for running gherkin compatible text based scenarios. However it accomplishes its task in a very different way to NBehave, and the differences are worth looking at in a separate post.

Initially John and myself took a look at making a ReSharper plug-in, however its API was driven towards running code not text and getting things working was not immediately obvious. So instead we decided on testing out the visual studio API which we had far more success with.

So let’s take a look at the new VS2010 runner and how it can make life a little easier. We will need to get the installer from the build server as the plug-in is quite new and has not made an official release yet. I would recommend getting the latest executable artefact from the following link:

Now we can run the installer and ensure the plug-in is ticked, this will deploy the VSIX package into the appropriate location.

Assuming you have a project already using text based scenarios, or have follow Johns blog post then we should be ready to go. I already have a solution ready so let’s take a look:

We can see the plug-in is loaded and ready to go, I already have a feature file and it’s associated step file set up:

If we right click on the feature file then we will find some new context menu options:

Picking Run Scenario will run the scenarios in a separate process and published the results in the output window:

The debug option does as you would expect, and both options currently run all the scenarios in the selected file. This is the first version and is quite light on features, however there are some planned:

Run a single scenario.

Run from solution explorer.

Syntax highlighting and completion for gherkin files.

Full featured results window instead of output window.

Go to step definition from scenario.

Keyboard shortcuts.

I hope you find it useful, if you have any suggestions or bugs you can get me on twitter at @naeemkhedarun or on CodePlex at http://nbehave.codeplex.com