Question

Just looking for some examples of BDD/SpecFlow - ideally a projectб so I can see how to use SpecFlow on big projects where multiple features my reference the same steps etc.

I've read a few blogs over the last few months, but haven't had a nice, juicy project of someone else's to mooch around through.

Was it helpful?

Solution

The official example set of SpecFlow can be found on github: http://github.com/techtalk/SpecFlow-Examples

The ASP.NET-MVC/BookShop sample is the one that you can have a look. It is not a very big project though. (If you a need VS2010 sample, switch to the VS2010 branch.)

OTHER TIPS

Another great place to find examples are from the tests for the SpecFlow project itself.

In particular those used to test the Gherkin parsing: https://github.com/techtalk/SpecFlow/tree/master/Tests/TechTalk.SpecFlow.Specs/Features

Those tests show a lot of ways to write scenarios using syntax for mutliline parameters, table parameters, templates, and more.

Also check out Steve Sanderson's GuestbookDemo, which shows off how to use SpecFlow with WatiN in ASP.NET MVC.

Also, see Brandon Satrom's recent MSDN article on the topic: http://msdn.microsoft.com/en-us/magazine/gg490346.aspx

We have used SpecFlow to formulate scenarios on the CQRS Journey project. Check out the overview of how we did it and then take a look at the acceptance tests themselves in the code repo.

I know it is an answered question. Just in case some one needs a quick simple web test project skeleton. I have created a nuget package SeleniumNUnitSpecflow for quickly setting up Specflow with Nunit and Selenium.

PM> Install-Package SeleniumNUnitSpecflow

Details: Web page BDD test with selenium specflow nunit

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top