Visual Studio 2015: SpecFlow

Dunno why, but installing SpecFlow in Package Manager console works… but then I can’t find the items.

So going here, gives you this:


Same how-tos here and page dedicated to 2015 here.

Install it…


Then when you stop and start VS, you get this:


I had already created a MSTest project inside a console application solution. Before I didn’t have the SpecFlow items, now I do, when I go to add an item:


The first time of asking, we get this:



So easy enough to resolve the SpecFlow reference, now just the NUnit.

This is the app.config for the other project (sic):


And I’ve seen comments saying that you need this line (first for context):

      <unitTestProvider name="MsTest.2010" />

I dragged the updated app.config into the Unit Test Project, thus…



Also note that the generated file now contains MSTest references, not NUnit references, since we have the new entry in the app.config (the squiggles are because it can’t find a schema for SpecFlow:


Perhaps now I can get to the error I was trying to demonstrate. Oh but first I have to give it some bindings:


So now we have that (PasteBin here)…


Then the test passes…


And then I was playing with the tags trying to get it to break with this error re ScenarioContext and missing key… but I can’t now (get it to break).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s