开发者

SpecFlow / BDD Examples

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,开发者_JS百科 juicy project of someone else's to mooch around through.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜