If a java process exits with exit code 137, it usually indicates an out of memory error. In this case I would suggest trying to give the forked test process more memory. Take a look at this documentation for possible configuration options: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html