I have around 10 testcase in Login module. I have to execute the test on Staging and Product environment but on Product environment, need to exclude some specific testcase which require some dummy data to be insert in application. For that i have added one group name PRO_EXCLUDE
in my scenarios.
Refer the below example with combined group names which i need to exclude while executing.
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
And rest of method have only one group i.e. REGRESSION
I've configured the test in below manner
<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>
This executes the scenario which have REGRESSION
and PRO_EXCLUDE
group both. I don't want to execute this one but rest of Scenarios with only REGRESSION
group.