当我运行单元测试时,我得到:
一个或多个步骤定义尚未实现。
SpecFlowFeature1Steps.GivenIHaveEnteredIntoTheCalculator(50)鉴于我在计算器中输入了 50
最佳答案
我必须从所有方法中删除 ScenarioContext.Current.Pending();
:
[Given(@"I have entered (.*) into the calculator")]
public void GivenIHaveEnteredIntoTheCalculator(int p0)
{
ScenarioContext.Current.Pending(); // remove this
}
我没有意识到这是导致错误的原因,我认为这是因为缺少步骤定义。
无论如何,留下这个以防将来有人遇到同样的错误。
关于c# - SpecFlow 错误 : One or more step definitions are not implemented yet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48827984/