I have a feature file with 5 scenarios :
@Scenario_1
@labelA
Given....
@Scenario_2
@labelB
Given....
@Scenario_3
@labelA
Given....
@Scenario_4
@labelA
Given...
@Scenario_5
@labelB
Given...
On my system, it executes in the same order in which it is present on the FF - 1,2,3,4,5. However, on a VM, it executes in any random order, like 4,1,5,3,2.
I need 1 to be compulsorily executed before 2, and 2 to be compulsorily executed before 3 and so on. Is there a way to force Cucumber to run the scenarios in the order in which they are present in the feature file ?
to do this one way is : to order the features at the lauching of the cucumber executable :
i.e.
./cucumber.sh myfeatures\second\1.feature features\first\2.feature features
where will be executed in order:
myfeatures\second\1.feature, then
features\first\2.feature, then
features.