We’re using Gradle as a test runner for our fairly heterogenous project ( built with grails, dropwizard and yeoman ).

One of the problems we ran into is that we wanted to execute our tests when all our services were ready.

There doesn’t seem to be a way to do so with the standard Exec task. There are plugins that allow you to start, say, Tomcat, Vert.X or the Google App Engine.

But it felt really cumbersome to have to write a task that simply starts yeoman or grails. This seems to be a common question around testing. Both being asked before in the mailing list, StackOverflow and Gradle JIRA.

In this post, I write about a hack we wrote to allow Exec to wait for a service to be ready and ask for better ways of doing this type of work in Gradle.