# Combined test reports

**URL:** <https://discuss.gradle.org/t/combined-test-reports/3592>\
**Category:** Old Forum Archive\
**Created:** [June 18, 2013, 12:35pm UTC](https://discuss.gradle.org/t/combined-test-reports/3592 "2013-06-18T12:35:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sason\_Ohanian](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Sason\_Ohanian](https://discuss.gradle.org/u/Sason_Ohanian)\
**Post date:** [June 18, 2013, 12:35pm UTC](https://discuss.gradle.org/t/combined-test-reports/3592/1 "2013-06-18T12:35:00Z")

</div>

Hi!

I’ve searched everywhere and found some answers to this question but i can’t get any of them to work.

I want to combine all test reports of a multi project build into one report. What i found was an example of the TestReport task that I’ve added to my root project. I basically copied the example that comes with the gralde 1.6 dist. It look like this:

```gradle
subprojects {
    def javaSrc = "java/src"
 def javaTestSrc = "java/testsrc"
    if (new File(project.projectDir, javaSrc).exists() ||
   new File(project.projectDir, javaTestSrc).exists()) {
     apply plugin: 'java'
  apply plugin: 'eclipse'
      sourceCompatibility = 1.6
  targetCompatibility = 1.6
      buildDir = new File(rootProject.projectDir, "gradleBuild/" +
    project.projectDir.getAbsolutePath().replace(project.rootDir.getAbsolutePath(), ""))
       repositories {
   mavenLocal()
   maven {
    url "http://repository/nexus/content/groups/public"
   }
   mavenCentral()
  }
      test {
   workingDir = rootProject.projectDir
   testReport = false
  }
       dependencies {
   testCompile 'junit:junit:4.11'
   compile 'log4j:log4j:1.2.14'
   compile 'org.mockito:mockito-all:1.9.0'
   compile 'org.powermock:powermock-core:1.4.12'
   compile 'org.powermock:powermock-api-mockito:1.4.12'
   compile 'org.powermock:powermock-api-support:1.4.12'
   compile 'org.powermock:powermock-module-junit4:1.4.12'
   compile 'org.powermock:powermock-reflect:1.4.12'
   compile 'org.powermock:powermock-module-junit4-common:1.4.12'
  }
      sourceSets {
   main {
    java { srcDir javaSrc }
    resources { srcDir javaSrc }
   }
   test {
    java { srcDir javaTestSrc }
    resources { srcDir javaTestSrc }
   }
  }
 }
}
  task testReport(type: TestReport) {
 destinationDir = file("$buildDir/reports/allTests")
 def javaprojects = subprojects.findAll { project ->
  project.plugins.hasPlugin('java')
 }
 reportOn javaprojects*.test
}

```

when I run the testReport the projects are built and tests are run, then a test fails and I get a message where I can find the report file, but there are no reports created where I expect them to be. Is it because the tests fail? Must all test run in order to combine them?

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [June 21, 2013, 11:16am UTC](https://discuss.gradle.org/t/combined-test-reports/3592/2 "2013-06-21T11:16:00Z")

</div>

It is because the tests are failing.

You can workaround this by running with ‘–continue’. We are working on task finalizers, which will provide a better solution for this.
