我在登录模块中有大约 10 个测试用例。我必须在 Staging 和 Product 环境中执行测试,但在 Product 环境中,需要排除一些特定的测试用例,这些测试用例需要在应用程序中插入一些虚拟数据。为此,我PRO_EXCLUDE
在我的场景中添加了一个组名。
请参阅下面的示例,其中包含我在执行时需要排除的组合组名。
SCENARIO: verify login landing page
META-DATA: {"TestCase_ID":"BP_L&R_001","description":"verify login landing page ","groups":["REGRESSION","PRO_EXCLUDE"]}
Given user is on homepage
When clicks on login link
Then verify page title text with title '${loginpage.title}'
END
其余方法只有一组,即REGRESSION
我已经按照以下方式配置了测试
<test name="Login" enabled="true">
<method-selectors>
<method-selector>
<script language="beanshell"><![CDATA[ return groups.containsKey("REGRESSION") && groups.containsKey("PRO_EXCLUDE");]]></script>
</method-selector>
</method-selectors>
<parameter name="scenario.file.loc" value="scenarios/login.bdd" />
<classes>
<class name="com.qmetry.qaf.automation.step.client.text.BDDTestFactory"></class>
</classes>
</test>
这将执行同时具有REGRESSION
和PRO_EXCLUDE
分组的场景。我不想执行这个,但其余的场景只有REGRESSION
组。