I'm creating an executable jar file for some of my less tech literate coworkers to run tests without having to use the command line. It's a simple gui where they select the features they want to test and the step library is packaged within.
It works fine except for one small problem. At the moment I have to specify where I call the feature files from. Right now I have this set to look for a
The value for annotation attribute CucumberOptions.features must be a constant expression
You can use QMetry Automation Framework to run your gherkin. With QAF gherkin client you will be able to configure your features to run from xml configuration file. there you can specify one of more dir or feature file to run as well as you can apply filter, or you can configure your tests to run on different platforms. Here is the sample xml configuration file
<test name="Gherkin-QAF-Test"> <parameter name="scenario.file.loc" value="resources/features" /> <classes> <class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" /> </classes> </test>
More over you can set
scenario.file.loc as command line argument or in properties file.