serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
722 stars 518 forks source link

Same driver instance is called when executed parallelly with a custom driver, as in Serenity version 4.2.8. #3577

Open iamtech123 opened 4 days ago

iamtech123 commented 4 days ago

What happened?

When running UI tests in parallel, all tests are executed in a single browser, despite the fact that the required number of browsers have been opened.

What did you expect to happen?

The necessary tests should be carried out in the relevant browsers.

Serenity BDD version

4.2.8

JDK version

17

Execution environment

Windows

How to reproduce the bug.

Clone : https://github.com/serenity-bdd/serenity-cucumber-starter Add custom driver implementation public static DriverManager getManager(DriverType type) { DriverManager driverManager = null; switch (type) { case CHROME: driverManager = new ChromeDriverManager(); break; case FIREFOX: driverManager = new FirefoxDriverManager(); break; } return driverManager; }

Runner @Suite @IncludeEngines("cucumber") @SelectClasspathResource("/features") @ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.stepdefinitions,com.test") public class Runner {}

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

iamtech123 commented 3 days ago

This issue occurs only when using Junit runner parallelly.