--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@Cucumber.Options(features=
and see if that works.To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 9 January 2017 at 09:51, <gu...@gopro.net> wrote:Hey everyone!
I am using Cucumber with Java to create some test suites. One of the test suites is testing a Rest API we have, mostly CRUD operations, so scenarios and features are highly coupled (I know this is not ideal, but in this situation it seemed to be justified).
The structure of feature files can be seen below, the glue and implementation files follow suite.
What happens is this (4 scenarios):
1. Running with maven test on Windows: Execution order is normal.
2. Running as a jar file on Windows: Execution order is normal.
3. Running with maven test on Linux: Execution order is NOT normal. Delete tests of the CRUD operations, which should be last, are done first. Meaning that it tries to delete files that are not there, then starts all the other CRUD operations and then leaves the test data on the server.
4. Running as a jar file on Linux: Execution order is normal.
I get no errors or anything indicating why this is happening and searching for a solution online has been a dead end. Anyone seen this kind of behavior before - and maybe knows how to fix this?
Best regards,
Gulli
You have made a mistake coupling your scenarios together. There is nothing special about CRUD operations for a REST api that requires/demands coupled scenarios. You have a couple of options1. Uncouple your scenarios
2. Use a different test tool
3. Find a way to force Cucumber to run scenarios in the order you want on all platforms
I suspect you will want to do 3. My advice is to do 1. I'm afraid I don't know how to do 3 outside of running one scenario at a timeNote: Cucumber is not misbehaving on Linux. The expected execution order for Cucumber is to run scenarios randomly. Clearly Cucumber java doesn't do a very good job of doing this.Hopefully someone else will have some more info to help with maven.All bestAndrew
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi!
I wasn't thorough enough in my opening post, it's not the scenarios that are not executing in the right order (I didn't even know they were random), but it's the features that are running out of order, only when run on Linux and only with Maven. As can be seen in the picture, all scenarios run in the order they are supposed to (as I've learned it is alphabetically) - except when run with maven on Linux. Then the last feature (in package testsuite.test_9.services) seems to run before all the others (which then execute in the right order).
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.