Cucumber-jvm: Support to define execution order of feature files in cucumberconfig file

Created on 7 Apr 2016  ·  3Comments  ·  Source: cucumber/cucumber-jvm

It will be very useful if we have options to define the execution order of feature files.

Most helpful comment

We'll never add this I'm afraid. It's an old debate and our firm stance is that scenarios should be independent.

All 3 comments

We'll never add this I'm afraid. It's an old debate and our firm stance is that scenarios should be independent.

@aslakhellesoy It appears that Cucumber core acts differently: it enforces voluntary chosen order of features, which e.g. a User listed in CucumberOptions annotation.
In cucmber.runtime.model.CucumberFeature#load it sorts the provided lists of features using CucumberFeatureUriComparator

  1. This hardcoded sorting effectively makes tested features dependent on this order, making it hard even to test, if features are actually independent. Please remove this sorting or at least add an option to skip sorting.
  2. This behaviour contradicts with e.g. JUnit, which executes test classes in the same order they are listed in a test suite, see https://github.com/junit-team/junit4/wiki/aggregating-tests-in-suites

So current behaviour is clearly a bug, I will create a separate issue for it.

BTW, cucumber-ruby does allow to change execution order of features, see https://github.com/cucumber/cucumber-ruby/issues/969

?!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings