prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
132 stars 38 forks source link

Scenarios run in sequential manner #287

Closed aravindkesavarapu closed 3 years ago

aravindkesavarapu commented 3 years ago

Hi @prashant-ramcharan,

Actually I have written almost 150 testcases for an web application. Some of test cases are dependent on other test cases. Some times the dependent test case executing prior than other(i have observed that these test cases are running in alphabetical order).

Is there any configuration to run scenarios in sequential manner?

prashant-ramcharan commented 3 years ago

Hi @aravindkesavarapu

The short answer: No, there's no additional configuration to run scenarios in a sequential manner other than using CourgetteRunLevel.FEATURE.

Some of test cases are dependent on other test cases

This is usually an anti pattern and should be avoided.

Also, if you choose to use CourgetteRunLevel.SCENARIO there would be no guarantee that the dependant scenario gets run first.

If you choose to use CourgetteRunLevel.FEATURE then you could be in a situation where:

Scenario 1: PASSES Scenario 2 (dependant on Scenario 1): FAILS Scenario 3 (dependant on Scenario 1): PASSES

If you have rerunFailedScenarios enabled then Scenario 2 will never be able to pass in it's own right.

You may be better off using a Cucumber runner to run scenarios in sequence.