title: Gradle Merge Junit Report
body: <p>Is there a way in gradle that the junit xml report can be merged into a single test report file. </p>
  
  <p>When we executed our IntegrationTestSuite.java with cp-suite in ant there is a single junit report. On gradle multiple junit reports are created.</p>
  
  <p><code>IntegrationTestSuite.java</code></p>
  
  <pre class="lang-java prettyprint-override"><code>@RunWith(Categories.class)
  @Categories.IncludeCategory(IntegrationTests.class)
  @Categories.ExcludeCategory(DebugJenkinsTests.class)
  @Suite.SuiteClasses(AllTestSuite.class)
  public class IntegrationTestSuite { /* nop */
  }
  </code></pre>
  
  <p>Snipped from <code>build.xml</code></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;junit&gt;
     &lt;formatter type="xml" /&gt;
        &lt;batchtest todir="${testreport.dir}"&gt;
            &lt;fileset dir="${test-src.dir}"&gt;
                &lt;include name="**/IntegrationTestSuite.java" /&gt;
            &lt;/fileset&gt;
         &lt;/batchtest&gt;
  &lt;/junit&gt;
  </code></pre>
  
  <p>Snipped from <code>build.gradle</code></p>
  
  <pre class="lang-groovy prettyprint-override"><code>task integrationTestSandro(type: Test) {
      reports.html.enabled = false
      include '**/IntegrationTestSuite*'
      reports.junitXml.destination = "$buildDir/test-results/integration"
      maxHeapSize = testTaskMaxHeapSize
      jvmArgs testTaskJVMArgs
  }
  </code></pre>