Gradle allows me to run multiple jvms for testing as follows:
test { maxParallelForks = 10 }
Some tests for the application that I have require a fake ftp server that needs a port. This is pretty easy to do with one jvm:
test { systemProperty 'ftpPort', 10000 }
However, when running in parallel, I will need to start 10 fake ftp servers. How to add a custom system property for every jvm created by gradle?
Something like:
test { maxParallelForks 10 customizeForks { index -> systemProperty 'ftpPort', 10000 + index } }
testing gradle
Knut saua mathiesen
source share