Closed sgavathe closed 6 years ago
It looks like you have set up the project to use NUnit rather than SpecFlow+ Runner. If this is your first time using SpecFlow, I'd recommend that you stick to the steps in the guide so you have understood the basic principles and worked through the whole process once. You can always switch the project over to NUnit later. Your first goal ought to be to get some tests running and understanding how everything is tied together. One step at a time :)
You do not need to license SpecFlow+ Runner to run the tests, although there is a short delay before executing the tests. While that might get tiresome after while, for this project it is unlikely to be a problem. You can always request a trial key if the delay irks you.
Thank you. I figured, it had to be with nUnit. I was unsure about the license needed for SpecFlow+ Runner. Thanks for clarifying.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
New to Spec Flow and have a setup feature and stepdefintion file question.
SpecFlow Version:
Used Test Runner
Version number:
Visual Studio Version
Are the latest Visual Studio updates installed?
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config
Repro Project
Issue Description
I have been trying to get my very first project setup using the steps provided at http://specflow.org/getting-started/
The step definition skeleton file looks much different than the above link. Am I missing something?
Steps to Reproduce
I have included the packages as below,
After I created first sample Feature file and the sample generated step definition file looks whole lot different than the one shown here.
My File ->
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) { testRunner.OnScenarioStart(scenarioInfo); }
line 7
this.ScenarioSetup(scenarioInfo);
line 8
testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
line 9
testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
line 10
testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
line 11
testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
line hidden
Your File:->
using System; using TechTalk.SpecFlow; using Microsoft.VisualStudio.TestTools.UnitTesting; using Example;
namespace MyProject.Specs { [Binding] public class CalculatorSteps { private int result; private Calculator calculator = new Calculator();
}