3

我最近从 SpecFlow 1.9.0 升级到 2.0.0 和 NUnit 2.6.4 到 3.2.1。

下面的 SpecFlow 功能文件片段以前可以工作,但是现在失败并出现此错误:“NUnit.Framework.IgnoreAttribute”不包含采用 0 个参数的构造函数

@Register @Ignore
Feature: Registration page

这是失败的自动生成的 SpecFlow 要素类片段: [NUnit.Framework.IgnoreAttribute()]

@Ignore 标签如何在 SpecFlow 2.0.0 和 NUnit 3.x 中使用?

4

2 回答 2

1

在最新版本中,标签的使用发生了变化。现在你必须给它一个理由......

@Register @Ignore("reason")
Feature: Registration page  
于 2016-05-05T20:42:45.873 回答
0

您必须重新生成功能文件的代码隐藏文件。然后使用正确的参数生成 IgnoreAttribute。

于 2016-05-05T15:58:23.253 回答