【问题标题】:Multiple Scope value in Binding (Specflow)绑定中的多个范围值(Specflow)
【发布时间】:2015-06-16 16:29:54
【问题描述】:

我有一个在这样的功能之前运行的方法,

[BeforeFeature, Scope(Feature = "Feature1"]
Method()
{
}

我希望为我编写的另一个功能文件运行相同的方法,即 Feature2

如何在作用域绑定中结合这个“Feature2”?

我试过了

[BeforeFeature, Scope(Feature = "Feature1"]
[Scope(Feature="Feature2")]

但是没有用。该方法仅适用于 Feature1,不适用于 Feature2

【问题讨论】:

    标签: scope automated-tests specflow feature-selection feature-file


    【解决方案1】:

    根据scoping rules 多个Scope 绑定将是OR'd,所以我希望第二个示例能够工作。您确定功能名称拼写正确吗?

    我会尝试制作一个示例来验证这种行为。

    【讨论】:

    • 想通了。拼写错误。消耗了我半天的时间。无论如何谢谢你!
    • @AutomateFr33k 这是我 12 小时前的建议 :)。对不起,你失去了半天的时间......
    猜你喜欢
    • 2012-02-01
    • 2012-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-22
    • 1970-01-01
    • 2013-10-28
    • 1970-01-01
    相关资源
    最近更新 更多