Andrew Stopford's Weblog

poobah

Sponsors

News

Articles

Family

Old Blogs

April 2009 - Posts

BDD with RSpec\Cucumber\IronRuby.

A great deal of debate has been going on about Alt.NET, what it means, what it does etc. For me the concept means to learn something new and not just in the camp that is my bread and butter but in any sphere of our industry. The one place I have been watching with the most interest is the Ruby camp, sure Rails is getting all the press but what pikes my interest the most is the developments the Ruby community have made in BDD with tools such as RSpec and Cucumber (Cucumber is one of the coolest things I have ever seen).

In the .NET world we have IronRuby if you want to mix and match Ruby and your .NET skills, sadly IR does not play too well with Cucumber. If you take a look at this wiki page while the IR igems lets you obtain cucumber and rspec it seems to do very little. Instead you download MRI and install the Cucumber and RSpec gems then create a icucumber.bat file, one thing to note at this stage is the paths to IronRuby and Ruby may be different to the paths listed in the wiki example. My icucumber looks like

@ECHO OFF
REM This is to tell IronRuby where to find gems.
SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8
@"C:\ironruby\bin\ir.exe" "c:\ruby\bin\cucumber" %*


After installing IR 0.3 and the MRI from the click once installer (makes installing Ruby a breeze).

My experiments came to halt when I tried to run IR and Cucumber with a C# example due to a IR bug but I like what I see and I'll be spending more time with Ruby\RSpec and Cucumber over the coming months.

On a side note I also tried AutoSpec which runs RSpec tests for you as you save changes, auto running of tests is something that Gallio has added to test runners such as Icarus.

MbUnit 3 RTM

MbUnit 3 has been a long, long labour. It started around early fall of 2007 and under Jeff had grown and grown into todays final release. Along the way Gallio was born which as a Test Automation Platform this not only acts as the platform for MbUnit 3.0 but is intended as a complete stand alone infrastructure for test frameworks and it offers a great deal of exciting possibilities.

Jeff has today announced v3.0.6 Update 1 when in fact MbUnit has been stable since v3.0.4, sure there are bugs and changes to make but consider v3.0.6 as final, in other words MbUnit v3 is RTM.

There are a great deal of reasons why you should consider upgrading to MbUnit 3.0 from MbUnit 2.*. MbUnit 3.0 was a ground up rewrite, everything from the framwork to the installer is all new code, we threw out v2 and started again and the result is very powerful framework that while lending a great deal to the work Peli and the MbUnit team did is great deal more powerful. Other than offering a vaster range in asserts (including lamba based asserts) and more powerful row, typefixturefactory and combinatorial pairwise based tests MbUnit now also offers features such as contract verifiers and parallel processing. Gallio provides MbUnit with the runner infrastructure and the list of supported runners is amazing, like MbUnit v2 you can still run MbUnit v3 in MSBuild, NAnt, TD.Net, CruiseControl, commandline (much more ehanched in v3) and GUI (also vastly enhanced in v3) but now tools such as TeamCity, VSTS, Resharper, Powershell, NCover, TypeMock and even AutoCAD. Finally MbUnit v3 supports the MS MVC framework just as v2 does.

 I am excited about MbUnt v3 and I do want to say a huge thank you to Jeff, Julian, Graham, Yann and the whole team for so all their hard work in making this happen.

 

Posted: Apr 02 2009, 10:34 PM by andrewstopford | with 6 comment(s)
Filed under: ,
More Posts