Skip to content

Instantly share code, notes, and snippets.

@ejona86
Created February 16, 2024 21:21
Show Gist options
  • Save ejona86/5afbe84d6c149b16dc823bf97d4964f8 to your computer and use it in GitHub Desktop.
Save ejona86/5afbe84d6c149b16dc823bf97d4964f8 to your computer and use it in GitHub Desktop.
Execute Gradle test many times
for (int x = 0; x < 10; x++) {
tasks.test.dependsOn tasks.register('test' + x, Test) {
Task test = tasks.test
useJUnit()
include test.includes
exclude test.excludes
classpath = test.classpath
executable = test.executable
jvmArgs = test.jvmArgs
options.copyFrom test.options
}
}
# Use configuration cache to run them in parallel
# gradle test --configuration-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment