Using below combination of versions, the parallel execution through surefire is not working properly. If we change Cucumber to 4.8.1, then the parallel execution through surefire works.
**Cucumber 6.10.2 or newer versions, cucumber-Spring, Junit 4.13.2 and Maven surefire 3.0.0.M3 and above **
But once the cucumber version is changed to 6.10.2, it does not work. The specific problem is, the webdriver session is getting leaked among the threads, or in simple word multiple threads acting on the same webdriver session.
I did lot of research and tried multiple configurations in the POM, but it did not work: Trial 1. Excluded junit-jupiter and jupiter-vintage-engine from cucumber-junit, excluded junit-jupiter and jupiter-vintage-engine from cucumber-Spring, Added surefire-junit47 dependency to surefire plugin Trial 2. Added jupiter-vintage-engine as dependency to surefire plugin Trial 3. Using Spring Boot version 2.6.2, Cucumber 6.10.2 or newer versions, cucumber-Spring, Junit 5 and surefire 3.0.0.M7
Will appreciate any help.