【发布时间】:2019-12-14 05:35:21
【问题描述】:
我们的功能文件包含仅适用于移动设备和桌面设备的场景。我只想在回归中运行移动场景。我应该如何添加这个过滤器,以便它只选择使用 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 中。过滤器不工作。请在这里帮助我。
【问题讨论】: