We have our unit tests running with forEvery=1 and maxParallelForks=4. But when we debug, we want those turned off. Is there a good way to do that from the command line? So far, I’ve been editing the build.gradle file, but that’s clumsy and might lead to somebody checking that in by mistake.
I tried:
test {
if (!debug) {
forkEvery=1
maxParallelForks=1
} }
in the build.gradle file, but setting -Dtest.debug=true on the command line didn’t prevent forkEvery from being set.