Screencast: Testing Web Applications in .NET with Cuke4Nuke and WatiN
Yesterday, I released Cuke4Nuke 0.2.2, which added WatiN compatibility and an example of how to use the two tools together. Here’s a short screencast in which I walk through the example:
Resources from the video:
- The Cuke4Nuke Wiki with installation instructions
- Source code from the example
- The new Ruby installer
[…] This post was mentioned on Twitter by Richard Lawrence, Tomi Juhola. Tomi Juhola said: RT @rslawrence New screencast: "Testing Web Applications in .NET with Cuke4Nuke and WatiN" http://bit.ly/6tGXfQ […]
Social comments and analytics for this post…
This post was mentioned on Twitter by tomijuhola: RT @rslawrence New screencast: “Testing Web Applications in .NET with Cuke4Nuke and WatiN” http://bit.ly/6tGXfQ…
[…] 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 […]
[…] Using the power of watin I created some basic tests (for my site I'm developing at work), I created 4 senarios in features files and I ran them using the ruby command line tool. For help on setting up these tests I used Richard Lawrence's (developer of cuke4nuke) example on Testing Web Applications using Cuke4Nuke and WatiN. […]
I like the cucumber concept alot. Its my favourite tool for test at the moment.
However I’m not that keen on the implementation. I find the ruby cucumber test runner slow (esp under IronRuby), cryptic, and frustrating. And another problem is that for lots of .Net people is that they get frightened of the ruby part. their loss I’m sure but you know what some people are like!
So where I’m going with this comment is: what are your thoughts on a fully native .net runner? Maybe even with a GUI to tempt all those windows developers?
@Mike – The point of the wire protocol implementation we used for cuke4nuke was to avoid IronRuby, precisely because it’s slower than MRI (the normal Ruby interpreter). If IronRuby were fast enough, we would have used it the same way cuke4duke uses JRuby to run Java step definitions in-process. Aslak is talking about doing an all-Java version cuke4duke to remove the Ruby dependency there. I may do the same for .NET after seeing how that works out. For now, running cuke4nuke with IronRuby is far from optimal. I recommend using MRI instead.
For an all-.NET alternative today, you might look at SpecFlow, a cucumber-style tool that uses the same Gherkin parser. They’ve focused heavily on Visual Studio integration, so you might find the runner more to your liking (it generates unit tests, so you just use any unit test runner).
Could you tell me can I write feature file and step def for my application written in MFC.
Client sever application
@MF – It depends very much on how your application is designed and at what level you’d like to automate it. I have one client who tests their C/C++ app from Ruby Cucumber via a Ruby to custom-RPC interface they created. Others test their app through a service layer. I don’t know whether there are libraries to automate MFC apps through the GUI. The bottom line is that if you can drive your app somehow from Ruby, Java, or C#, you can test it with Cucumber. Step definitions are essentially just methods.