Running tests in parallel


This is about a project where the code is written in Java, the test code is written in Scala ( ScalaTest with JUnitRunner ). Building is done with gradle (1.11), of course.

A sample project is at :

I want to make the tests run in parallel.

I put this in my build.gradle file :

test {
 forkEvery = 1
 maxParallelForks = 3

There’s 3 tests , reading the explanation from the book “Gradle Effective Implementation Guide” , the code above should fork a jvm for each test, in parallel.

Typing “jps” ( jps - Java Virtual Machine Process Status Tool) at the command line should show 3 “GradleWorkerMain” . However, I only see one “GradleWorkerMain”.

Any way to do this ? Is there a working example / minimal project that I can look at ?

Cheers !