Gradle plugin for running groups of tests with varied runtime requirements.
...
This plugin defines a concept of categories
. Categories are communicated via the category
Gradle property (i.e. gradle test -Pcategory=fast
)and are used to set up a test process to run tests based on tags, parallel execution settings, and JVM arguments.
Built in categories
The default settings can be scaled via the cpuThreads
property (i.e. -PcpuThreads=8
). The default value is 8
.
...
...
Run untagged tests as fast as possible.
Assume no special runtime requirements.
...
Custom categories
In your project's build.gradle.kts
(Kotlin):
Code Block |
---|
categories.create("scs-slow") { classesPerJVMforkEvery = 10 // default: 10 maxJVMsmaxParallelForks = 21 // default: 2 maxParallelTests = 1 // default: 4 excludeTags includeTags += "nonescs-slow" // default: all tests, fast tests, includeTagsor += "scs-slow" // default: empty category name jvmProperties += "some.arg" to "value" // default: empty List jvmArguments += "-Dsome.arg=value" // default: empty List minHeapSizeGB = 1 // default: 1 maxHeapSizeGB = 8 // default: 4 } |
...
Code Block |
---|
def gui = categories.create("gui") gui.classesPerJVMforkEvery = 0 gui.maxJVMsmaxParallelForks = 1 gui.initialHeapSizeGB = 6 gui.maxHeapSizeGB = 8 def video = categories.create("video") video.classesPerJVMforkEvery = 0 // forkEvery video.maxJVMsmaxParallelForks = 1 // maxParallelForks video.initialHeapSizeGB = 6 video.maxHeapSizeGB = 8 def scsAllocation = categories.create("scs-allocation") scsAllocation.classesPerJVMforkEvery = 0 // forkEvery scsAllocation.maxJVMsmaxParallelForks = 1 // maxParallelForks scsAllocation.jvmArguments.add("allocationAgent") scsAllocation.initialHeapSizeGB = 6 scsAllocation.maxHeapSizeGB = 8 |
...
Set the Gradle property ciBackendHost = 0.0.0.0
. This will be places into the following text to form a url: "http://$ciBackendHost/sync"
When the task runs, it sends the project name
and "all tests to tags
" map.
...