title: Gradle run unit and integration tests in parallel for same project on same machine
body: <p>I am trying to reduce the time taken to run tests using gradle. Since there are multiple projects, one of the ways that I can think of doing that is to split tests into Unit and Integration tests. For each project, I have created two different tasks: unitTests task and integrationTests task. </p>
  
  <p>Assume for simplification, that we always run <code>gradle build -x test</code> before running tests. In such a scenario, I am trying to get to state where I can run the tasks unitTests and integrationTests in parallel.</p>
  
  <p>Currently I have seen failures where one of the tasks starts compiling the project leading to the other task failing with the error : "Cannot read zip file" which is likely because the JAR that the project depends on is now being updated by the other process. This seems to be likely because we have compileJava and compileTestJava as dependent tasks which interfere with dependent projects leading to a failure.</p>
  
  <p>Wondering if there is a way in gradle to do the following :</p>
  
  <ol>
  <li>Run only tests and not compile anything (to the tune of surefire:test in maven).</li>
  <li>If not, is there settings that can be specified in build.gradle to tell gradle not to modify files but just to run tests.</li>
  </ol>