I would like to implement/have the following feature: From the workspace on my computer I would like to execute tests remotely on Jenkins. This should happen without having to check in. My usecase is that we have a lot of GUI-Tests. If you run them locally, you cannot do anything with your computer while they are running. But we have enough jenkins windows slaves where we could execute these tests. So why not use them?
My current idea for an implementation of this feature would be the following: * Configure the Test-Task to use Jenkins to do the tests (configure Jenkins URL, …) * When running ‘gradle test’ then a Job on Jenkins is started which gets scheduled to one of the windows executors. This job then connects to the local gradle process via a hudson.remoting.Channel. * The Test-Task waits for the connection on the Channel and then uses it to send over the Test-Execution to the Jenkins-Slave * The Slave executes the Tests * The result of the Test-Run is sent back to the local gradle instance * The Test-Task finishes and displays the result.
It would also be awesome to use the current forking options on top of running on Jenkins. For example one could then use gradle from Jenkins to distribute Tests to slaves, to make them run concurrently.
I already poked around in the Gradle sources to try to find out where to integrate this feature. I could probably try to replace the DefaultTestExecutor in the Test Task. Another option would be to wrap on ObjectConnection over the Channel. What would you suggest?
For the Jenkins side I would have to implement a plugin which starts a vm and opens the Channel to the local gradle plugin. But this is not too difficult.