SimitTomar / wdio-cucumber-parallel-execution

A WebdriverIO capability for running Cucumber scenarios in parallel.
25 stars 10 forks source link

Control over order of execution #27

Closed rameshkumarj closed 2 years ago

rameshkumarj commented 2 years ago

Hi .. Can you please let me know if there is a way to control the order of execution with this package.

I have some dependant tests which need to run one after the other. Say if I have 10 scenarios and keep the pre-requisite scenario in start of feature 1 and the subsequent scenario at the last of the feature. With max instances as 5, will the scenario at the last be run at the end.

how does the feature get split. is it like below? Feature 1 : Scenario 1 Scenario 2 Scenario 3 Feature 2: Scenario 1 Scenario 2

will get split in order as below and passed to wdio in the same order

Feature 1: Scenario 1 (Scenario 1 from feature 1) Feature 2: Scenario 1 (Scenario 2 from feature 1) Feature 3: Scenario 1 (Scenario 3 from feature 1) Feature 4: Scenario 1 (Scenario 1 from feature 2) Feature 5: Scenario 1 (Scenario 2 from feature 2)

Sunny-sp commented 2 years ago

Read Webdriverio document, Its mentioned there all the scenarios should be independent of each other. we should be able to run scenarios in any order.

if you want 1 scenario to be as prerequisite for all other you can make it background instead of scenario. hope that is helpful.