Reputation: 1451
For the life of me I cannot get SpecFlow configured to use NUnit as the test runner. NUnit is not listed in the Tools > Options > SpecFlow test runner dropdown, and the "auto" setting doesn't find NUnit.
I've tried reinstalling both NUnit and SpecFlow multiple times. Tried installing SpecFlow 1.8.1 and 1.9 to no avail. Tried using app.config. I've even tried re-installing Visual Studio 2010.
I just want SpecFlow to use NUnit (2.6.1). Can anyone help?
Upvotes: 2
Views: 7304
Reputation: 235
Visual Studio->Tools->Extensions and updates->Online->search "Test Adapter"->install.
http://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d
better late than never.
Upvotes: 5
Reputation: 8720
To get integration with Visual Studio, you need to install the SpecFlow Extension. SpecFlow comes in 2 parts.
I am guessing you have installed the Nuget package, but haven't installed the extension.
To install the extension:
Upvotes: 0
Reputation: 10219
SpecFlow itself does not provide a test runner and if you want to right click on the .feature and run it, you'll have to re-configure SpecFlow to use MSTest, which should use built-in VS runner.
If you want to use NUnit, then additional tools are required. I would recommend Resharper, but it's not free. This article should help you choose a way to run NUnit tests from VS.
Good luck
Upvotes: 1
Reputation: 29186
Try editing the config file of your unit test project:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<specFlow>
<unitTestProvider name="NUnit" />
</specFlow>
</configuration>
Check out the config documentation here.
Upvotes: 1