如何使用QAF BDD2框架在运行BDD方案时应用过滤器?

问题描述 投票:0回答:1

我们具有功能文件,其中的场景仅适用于移动设备和台式机。我只想在回归分析中运行移动方案。我应该如何添加此过滤器,以使其仅选择使用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 ..

[当我尝试运行此程序时,它将运行并跳过桌面方案。我应该如何添加过滤器以仅运行移动方案并避免跳过桌面方案?我尝试了以下在config 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中。过滤器不起作用。请在这里帮助我。

bdd qaf
1个回答
0
投票

您缺少:以分隔元密钥值对。例如:

@ channel:['desktop','mobile']

© www.soinside.com 2019 - 2024. All rights reserved.