public
Created

Gradle rule to execute arbitrary groups of tests in isolation

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10
/**
* Add a rule that supports executing tests based on a series of comma delimited patterns(ant glob patterns).
*/
tasks.addRule("Pattern: testMulti<Name>,<Name2> will test **/<Name>.class,**/<Name2>.class") {String taskName ->
if (taskName.startsWith("testMulti"))
{
tasks.add(taskName).dependsOn(test)
test.includes = taskName.substring(9).split(',').collect {"**/${it}.class"}
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.