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*’

maxParallelForks=5

testClassesDir = sourceSets.test.output.classesDir

classpath = sourceSets.test.runtimeClasspath

systemProperties=System.getProperties()

if (project.hasProperty(“testBrowser”))

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

if(project.hasProperty(“envConfig”))

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

}