Cucumber-js: Features order

Created on 16 Feb 2017  ·  6Comments  ·  Source: cucumber/cucumber-js

Hello, @jbpros!
I read docs, but not found something about order run.
Can I specify the order of feature execution with global patterns?

cucumber --tags @first features/**/*

I mean run @first test and then run other tests.
Does it possible?

Most helpful comment

@aslakhellesoy but its still ok to keep some possibility to execute in order rite, lets the users decide whether to use it or not. for eg, If i need to execute a step to generate some test data say a booking id before editing or cancelling the booking it will be useful. Appreciate if you could consider this.

All 6 comments

Enforcing a particular order is something we discourage because it makes it impossible to run interdependent scenarios in isolation (which you need to do when you fix failing ones).

For this reason Cucumber will never help you run scenarios in a particular order.

Instead you should make sure they can run in any order.

Got it. Thanks! :smile_cat:

@aslakhellesoy but its still ok to keep some possibility to execute in order rite, lets the users decide whether to use it or not. for eg, If i need to execute a step to generate some test data say a booking id before editing or cancelling the booking it will be useful. Appreciate if you could consider this.

Really appreciate if there is some options to set, to make sure all scenarios are running in their written order inside each individual feature file.

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