Friday, June 24, 2011

A quick guide to SpecFlow, WatiN in a ASP.Net MVC world by Steven Smith

Steven Smith - Everything You Need to Get Started with SpecFlow and WatiN

I’m adding SpecFlow to an application I’m working on so that I can add some acceptance tests that actually exercise the user interface. I’ve only spent a couple of hours on it thus far, but I have it working with a single specification running through the tests via WatiN. I found the following resources helpful as I was going through this exercise:

  • ...

I’m assuming that you’re just interested in getting up to speed with SpecFlow for acceptance testing and that you don’t want to waste any time on hidden gotchas or visiting all of the above URLs just to figure out what you actually need. Let me just give you the Stuff You Need To Know™.

Installing SpecFlow



Testing ASP.NET MVC with WATIN


Automation and Reporting



There’s not a whole lot to getting SpecFlow and WatiN working with your ASP.NET (MVC) application. There are a few hidden gotchas that I’ve tried to cover in this post. Hopefully this will provide all of the resources you need. If there’s something missing, please let me know and I will provide an update to address the issue. The nice thing about the final HTML report you get is that you can sit down with the customer or project stakeholder and create all of the major features and many of the known scenarios prior to an iteration or release cycle, and then provide regular updates showing progress being made on a feature-by-feature (and scenario-by-scenario) level. Assuming the documented executable specifications accurately reflect the customer’s needs, these acceptance tests provide a common definition of what “done” is for the project, reducing the frequency of the team delivering incomplete or incorrect features."

I've heard a bit about SpecFlow and like the idea behind it. I don't think I've seen a good soup-to-nuts getting started guide like this before...

No comments: