Ok, thanks. What I was trying to do it run but tags rather than full feature files. So I could have a common feature for login, logout, in any directory and then have all my core scenarios else where named for that they are. Those could be broken out as well.I think we will just have every feature in the same dir with 0001_login.feature 0002_core.feature 000N_core.feature 9999_logout.feature.Then we can run by tags passing into the command line.I would just like to see the command line run the tags in the order you put them not matter the name or where those features are in the features main folder/sub folders.
On Thursday, June 23, 2016 at 4:34:08 PM UTC-4, Serguei Cambour wrote:
On Wednesday, 22 June 2016 21:32:03 UTC+2, Justin Radcliffe wrote:When building my project from maven, I can set my tag hierarchy from the feature order like:
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty","json:target/Cucumber-report/cucumber.json"}
,features={"src/test/resources/com/testcases/testsuite/gccx/common/login",
"src/test/resources/com/testcases/testsuite/gccx/activities",
"src/test/resources/onstar/testcases/testsuite/gccx/common/logout",}
,tags = {"@login,@package,@logout"})
public class RunnerTest {
public void runTest() {
}
}
Since I have my features broken out in an order I feel is appropriate and have common login and logout that should happen first and last.
Now that works building the pom and letting maven run the test.
When running from the command line though as :
java -cp lib\*;target\62100_Automation_KW-0.0.1-SNAPSHOT-jar-with-dependencies.jar cucumber.api.cli.Main --glue com.testcases C:\AutomationFrameworkKW\Automation_Framework\src\test\resources\com\testcases\testsuite\gccx --tags @login,@package,@logout --plugin pretty
This tries to run the package feature file first as that is in gccx/actvities and login is in gccx/login alphabetically.
Is there a way from the common line to have multiple feature files and have the running order?As described in the following thread, you should avoid the coupling between your scenarios/features. If you don' care, the only working solution would be to rename your features to match the ascending order, e.g. 01_my_most_imporant.feature, 02_less_important.feature.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/-nDqEsOFisA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sent from my iPhoneOk, thanks. What I was trying to do it run but tags rather than full feature files. So I could have a common feature for login, logout, in any directory and then have all my core scenarios else where named for that they are. Those could be broken out as well.I think we will just have every feature in the same dir with 0001_login.feature 0002_core.feature 000N_core.feature 9999_logout.feature.Then we can run by tags passing into the command line.
I would just like to see the command line run the tags in the order you put them not matter the name or where those features are in the features main folder/sub folders.Once again, the real effect of your tests is when they are run in a random way and to be coupled with each other. If you need to execute some stuff before or after, the corresponding hooks are always there to do the job.
On Thursday, June 23, 2016 at 4:34:08 PM UTC-4, Serguei Cambour wrote:
On Wednesday, 22 June 2016 21:32:03 UTC+2, Justin Radcliffe wrote:When building my project from maven, I can set my tag hierarchy from the feature order like:
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty","json:target/Cucumber-report/cucumber.json"}
,features={"src/test/resources/com/testcases/testsuite/gccx/common/login",
"src/test/resources/com/testcases/testsuite/gccx/activities",
"src/test/resources/onstar/testcases/testsuite/gccx/common/logout",}
,tags = {"@login,@package,@logout"})
public class RunnerTest {
public void runTest() {
}
}
Since I have my features broken out in an order I feel is appropriate and have common login and logout that should happen first and last.
Now that works building the pom and letting maven run the test.
When running from the command line though as :
java -cp lib\*;target\62100_Automation_KW-0.0.1-SNAPSHOT-jar-with-dependencies.jar cucumber.api.cli.Main --glue com.testcases C:\AutomationFrameworkKW\Automation_Framework\src\test\resources\com\testcases\testsuite\gccx --tags @login,@package,@logout --plugin pretty
features={"src/test/resources/com/testcases/testsuite/gccx"}
src\test\resources\com\testcases\testsuite\gccx\common\login src\test\resources\com\testcases\testsuite\gccx\activities src\test\resources\com\testcases\testsuite\gccx\common\logout