Can we execute cucumber tests in parallel with gradle test task

Trying to set up a gradle project and execute cucumber bdd tests created a gradle test task which calls the cucumber RunTests class with in test folder and runs all cucumber tests This set up works fine

But when tried to run the same tests parallely, by using ‘maxParallelForks’ option in gradle test, its not creating multiple browsers

  • is parallel execution supposed to work in gradle test task? below the gradle test task

task runTests(type:Test){

include ‘**/RunTests*’


testClassesDir = sourceSets.test.output.classesDir

classpath = sourceSets.test.runtimeClasspath


if (project.hasProperty(“testBrowser”))

systemProperties.put(“testBrowser”,testBrowser) else systemProperties.put(“testBrowser”,“FIREFOX”)


systemProperties.put(“envConfig”,envConfig) else systemProperties.put(“envConfig”, “stub”)