On Visual Studio 2010 Pro, I have SpecFlow and NUnit (separately) from NuGet in the same class library. The App.Config is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<specFlow>
<!-- For additional details on SpecFlow configuration options see https://github.com/techtalk/SpecFlow/wiki/Configuration -->
<unitTestProvider name="NUnit" />
</specFlow>
</configuration>
I have the default template feature file which correctly uses NUnit as in:
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Add two numbers")]
[NUnit.Framework.CategoryAttribute("mytag")]
public virtual void AddTwoNumbers()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] {
"mytag"});
#line 7
this.ScenarioSetup(scenarioInfo);
#line 8
testRunner.Given("I have entered 50 into the calculator");
#line 9
testRunner.And("I have entered 70 into the calculator");
#line 10
testRunner.When("I press add");
#line 11
testRunner.Then("the result should be 120 on the screen");
#line hidden
this.ScenarioCleanup();
}
The Tools->Options->SpecFlow->TestRunnerTool is set to auto but I see NUnit isn't listed in the drop down.
When I right click on the feature file and try to run the scenarios (default scenario about calculator and two numbers from template) the pop-up dialog says "Could not find matching test runner. Please specify the test runner tool in 'Tools/Options/SpecFlow'
How do I get NUnit in that drop down? Or what else can I do to make SpecFlow run the feature file?
NUnit.Framework.dll Runtime Version v 2.0.50727 NUnit.Framework.dll Version 2.6.0.12051
TechTalk.SpecFlow.dll Runtime Version 2.0.50727 TechTalk.SpecFlow.dll Version 1.8.1.0