30

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.

Alex Kulinkovich
  • 4,408
  • 15
  • 46
  • 50
nick
  • 1,477
  • 2
  • 20
  • 29

6 Answers6

22

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.)

Alex Kulinkovich
  • 4,408
  • 15
  • 46
  • 50
Gaspar Nagy
  • 4,422
  • 30
  • 42
12

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.

Marc Climent
  • 9,434
  • 2
  • 50
  • 55
ZombieDev
  • 959
  • 1
  • 10
  • 25
  • isn't that what Gaspar said 6 months ago (see above)? :P :) – nick Jan 15 '11 at 20:54
  • No, Gasper linked to the examples provided with SpecFlow. Those examples don't show every bit of Gherkin (or SpecFlow specific) syntax it can handle. I linked to the feature tests for SpecFlow itself (which are written as .feature files). These show a lot more than the basic examples. – ZombieDev Jan 25 '11 at 18:50
8

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

Brandon Satrom
  • 1,801
  • 14
  • 17
6

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

Grigori Melnik
  • 4,067
  • 2
  • 34
  • 40
2

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.

Grigori Melnik
  • 4,067
  • 2
  • 34
  • 40
1

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

Community
  • 1
  • 1
ValidfroM
  • 2,626
  • 3
  • 30
  • 41