specflow

How to learn/teach Gherkin for Cucumber

Hi, I'd like to enable the business analysts to be able to write all of their specs for features, scenarios and steps that is Cucumber friendly using Gherkin. I've read some of the basic info on the github site for Cucumber and from doing a quick Google search but wanted to know if there were recommended resources for getting non-techn...

SpeckFlow vs Cuke4Nuke vs Cucumber+IR

Hi all: Having a look at BDD frmaeworks and I can't help but wonder which one would suit us better. I like cucumber because, they have been there doing bdd for a good while(since early 2008) and I like ruby, however, we are a .net shop and although I find Ruby very friendly, other people doesn't; and I think that is fair enough (to a p...

Gallio + SpecFlow + NUnit + Visual Studio 2008 periodically fails to detect new tests

So, I have really been enjoying the integrated experience of using Gallio to run SpecFlow tests natively in VS, using all my usual VS hotkeys and everything. It works wonderfully, most of the time. Periodically, however, and I have found no rhyme or reason to it, a new scenario added to the .feature file (for SpecFlow) does not case a ...

How to get SpecFlow working with xUnit.net as the test runner

I'm trying to use xUnit.net as the test runner for SpecFlow. The SpecFlow 1.2 binaries from the official download area don't contain an xUnit.net provider but the master branch on GitHub has one, so I build SpecFlow.Core.dll from that. I'm using xUnit.net 1.5. However, when I change the unitTestProvider name in the app.config in my spec...

NUnit Test with WatiN, runs OK from Dev10, but when NUnit started from "C:\Program Files (x86)\NUnit 2.5.5\bin\net-2.0\nunit.exe"

I have the following code in an Nunit test ... string url = ""; url = @"http://localhost/ClientPortalDev/Account/LogOn"; ieStaticInstanceHelper = new IEStaticInstanceHelper(); ieStaticInstanceHelper.IE = new IE(url); ieStaticInstanceHelper.IE.TextField(Find.ById("UserName")).TypeText("abc"); ieStaticInstanceHelpe...

How do I get SpecFlow to expect an exception?

I'm using SpecFlow, and I'd like to write a scenario such as the following: Scenario: Pressing add with an empty stack throws an exception Given I have entered nothing into the calculator When I press add Then it should throw an exception It's calculator.Add() that's going to throw an exception, so how do I handle this in ...

In SpecFlow how can I share data between steps/features?

I have 2 features that use a common 'When' step but have different 'Then' steps in different classes. How do I access, for example, the ActionResult from my MVC controller call in the When step in my two Then steps? ...

Can I use multiple step definition files with SpecFlow?

I'm using SpecFlow to do some BDD-style testing. Some of my features are UI tests, so they use WatiN. Some aren't UI tests, so they don't. At the moment, I have a single StepDefinitions.cs file, covering all of my features. I have a BeforeScenario step that initializes WatiN. This means that all of my tests start up Internet Explorer, w...

How to get Gherkin syntax highlighting for .feature files in Visual Studio?

There's no highlighting for Feature, Scenario, Given, When, Then, etc. keywords by default. Is there a ready made template out there to enable this? ...

App.config for SpecFlow not recognized by NUnit GUI runner

How do I get my App.config file to be recognized/used by the NUnit GUI runner? I have tried placing it in the top folder of my project and in the same folder as my feature files. Here are the contents of my App.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="specFlow" type="Tech...

How do I disable a feature in specflow (Gherkin) without deleting the feature?

I have some SpecFlow features (using the Gherkin syntax) and I would like to temporarily disable the feature to prevent its tests from running? Is there an attribute I can mark the feature with to do this? I'm guessing that something that works with Cucumber might also work with SpecFlow. ...

How to run SpecFlow tests in Visual Studio 2010?

Trying to get SpecFlow running with a fresh VS2010 Professional install. Created a new console application and added references to NUnit and SpecFlow. Created a SpecFlow feature. The .feature with the default template code is created. Now I try to run this test, but I don't understand how. When I right-click the project (at the top-lev...

MSBuild: Add additional files to compile without altering the project file

After looking around I can't find a simple answer to this problem. I am trying to create an MSBuild file to allow me to easily use SpecFlow and NUnit within Visual Studio 2010 express. The file below is not complete this is just a proof of concept and it needs to be made more generic. <Project DefaultTargets="Build" xmlns="http://sche...

Is it better to specify all the parameters of a given in one line, or each parameter on a seperate line?

Is it better to specify all the parameters of a given in one line, or each parameter on a seperate line? i.e. which is better? seperate And for each parameter Scenario: some random scenario Given a menu with a menu width of 19 And quit text of "quit" And Fruit options of |Text| |some text| When ... Then ... or ...

Specflow - getting specflow to generate vb.net code in the output window

Hi does any one know how to configure specflow to output step definitions in a nunit output window? Thanks! ...

Using Specflow scenarios for both intergration tests and unit tests

I've just come across BBD and specflow and it looks very interesting. When writing user stories they are typically on a high-level and the actor users the GUI. So when writing scenarios they will typically be GUI test or integration test from a high level of the system. But what about unit test further down in the solution? E.g. service ...

How should I implement this specflow step?

Okay, I've decided to try and get to grips with the whole TDD process from start to finish. I'm writing a simple blog in ASP.NET MVC 2 Application and have started with doing acceptance tests to test my fetaures as I implement them. I'm using SpecFlow as my BDD/ATDD framework. I've been reading "Growing Object Orientated Systems Guid...

ATDD versus BDD and the proper use of a framework

I am just getting into the concept of BDD and have listened to Scott Bellware's talk with the Herding Code guys. I have been playing around with SpecFlow some and like it pretty well. I understand the distinction between ATDD and TDD as described in the blog post Classifying BDD Tools (Unit-Test-Driven vs. Acceptance Test Driven) and a...

Handling Async With Specflow for Silverlight

The Silverlight Unit test Framework defines a process for dealing with Async calls (derive test class from Microsoft.Silverlight.Testing.SilverlightTest, add Asynchronous attribute, use EnqueueXXX methods.) Considering the separation that SpecFlow presents between the test class and the steps: Can these tools be brought to bear to wai...

SpecFlow / BDD Examples

Hi Folks, Just looking for some examples of BDD/SpecFlow - ideally a project so I can see how to use spec flow 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. Cheers if you can help....