Cuke4Nuke – Cucumber for .NET

One of the main reasons I was drawn to adopt Ruby as my primary development language last year was the RSpec story runner, a fledgeling project to bring developers and users closer together with executable specifications that are easy for both humans and machines to read. I was really attracted to the community around these tools and the energy and focus they were putting into bridging that communication gap, and wanted to be a part of it.

18 months on and the RSpec story runner has matured into Cucumber, a hugely popular open-source tool for executing these tests. Ruby has made an excellent platform for Cucumber, the flexibility of the language and the collaborative open-source culture around it meaning the tool has matured rapidly, with over 177 different people contributing code to the project to date.

Over the summer, Cucumber began to speak to applications written in other programming languages than Ruby, by adding an adapter mechanism for the language in which the step definitions (the glue code which actually pokes around with your app) are written. Firstly this was done with JVM languages so that when Cucumber was run under JRuby, it could test an application via step definitions written in Java, Groovy, Clojure or Scala.

This still left .NET teams out in the cold though. One approach would be to run Cucumber under IronRuby but having tried some experiments with it, it feels like the slow boot-up time of IronRuby will make for frustrating TDD cycles right now. In response to this, I hatched a plot with Aslak Hellesoy, the creator of Cucumber, and Richard Lawrence to create a generic wire protocol for Cucumber which would allow it to invoke step definitions against a remote service written in any language. Over the last few months Richard and I have worked on the protocol, and at the same time Richard has built the .NET tool (Cuke4Nuke) that allows you to implement and serve up your step definitions in C#. Richard has just published an excellent short screencast which shows how to use it. If you’re writing .NET and would like to enjoy the warm glow of Cucumber, you owe it to yourself to take a look.

Published by Matt

I write software, and love learning how to do it even better.

Join the Conversation

4 Comments

  1. I use cucumber everyday and I love it. I’d love to expose it’s virtues to people outside of the ruby community, especially to the .NET crowd. With the pace at which the cucumber team published updates I bet it’s not too far off.

  2. hi
    I need to integrate cucumber tool with vsts 2010.and should use C# code this is for automation testing.
    how can i do this
    what steps need to follow
    Will anyone help me to do this set up.

    thanks

Leave a comment

Your email address will not be published. Required fields are marked *