0

我们有功能文件,其中包含仅适用于移动和桌面的场景。我只想在回归中运行移动场景。我应该如何添加这个过滤器,以便它只选择使用 QAF BDD2 的移动场景?

Ex: Feature Hello
@channel['desktop','mobile']
Scenario: This is applicable for desktop and mobile
Given ..
When ..
Then ..

@channel['desktop']
Scenario: This is applicable for desktop only
Given ..
When ..
Then ..

@channel['mobile']
Scenario: This is applicable for mobile only
Given ..
When ..
Then ..

当我尝试运行它时,它会运行并跳过桌面场景。我应该如何添加过滤器来运行移动场景并避免跳过桌面场景?我尝试在配置 xml 中添加以下代码不起作用

<parameter name="include" value="{'channel': ['mobile']}" />

并添加

<method-selectors>
    <method-selector>
        <selector-class name="com.qmetry.qaf.automation.testng.pro.QAFMethodSelector" />
    </method-selector>
</method-selectors>

在xml中也是。过滤器不工作。请在这里帮助我。

4

1 回答 1

0

您缺少:单独的元键值对。例如:

@频道:['桌面','移动']

于 2019-12-13T21:35:21.867 回答