I am trying to use the Tooling API to get a list of the Java test classes that will execute if I then run the test task, but I don’t want the tests to actually run at this point, I just want the names of the classes that will run.
Currently I can use…
testNameRecorder takes any
ProgressEvent with descriptor
JvmTestOperationDescriptor and saves the
That gets all the class names correctly, but obviously also runs the tests.
I was hoping I could add something like
.withArguments("--dry-run") as shown here but this doesn’t seem to work.
Is there a way to do this?
I was thinking of an
init script with…
dryRun = true
but I just get…
Could not set unknown property 'dryRun' for task ':myProject:test' of type org.gradle.api.tasks.testing.Test.
I’m not sure
dryRun would work anyway as I don’t know how much it skips - the whole test or does it enumerate all test classes/methods still but just not run them?