I am using bdd implementation provided by qaf for test automation and using qaf-bdd-editors eclipse plugin for development. I am able to run my scenarios using xml configuration file but to run specific single scenario need to modify confirmation file each time. Is there any easier way to run selected scenario in editor without modifying configuration file?
You can achieve it by doing below trick:
config/selectionrun_config.xml
<suite name="QAF Demo">
<test name="BDD Test">
<method-selectors>
<method-selector>
<script language="beanshell"><![CDATA[
System.getProperty("selection","").length()==0 || testngMethod.getMethodName().equalsIgnoreCase(System.getProperty("selection","").trim())
]]></script>
</method-selector>
</method-selectors>
<classes>
<class
name="com.qmetry.qaf.automation.step.client.text.BDDTestFactory" />
<class
name="com.qmetry.qaf.automation.step.client.text.BDDTestFactory2" />
</classes>
</test>
</suite>
RUN_SELECTED_SCENARIO
config/selectionrun_config.xml
-Dscenario.file.loc="${selected_resource_loc}" -Dselection="${selected_text}"
You also can select scenario in editor and directly run by Run button in top navigation.