Custom Integration Test Results not being merged into index.html test report

Hi,

I have setup a custom configuration for integration-tests and all is working as it would be expected however the results of the integration tests ARE being put into the reports directory but ARE NOT being added to the index.html file as it seems that the test task is overwriting it with its results - if I simply run the task integrationTest the index.html file then the integration test results appear (as I would expect).

Any Thoughts?

Thanks,

Ian.

apply plugin: 'groovy'
  repositories
        {
            mavenCentral()
        }
    configurations
        {
            integrationTestCompile
                    {
                        extendsFrom testCompile
                    }
            integrationTestRuntime
                    {
                        extendsFrom integrationTestCompile, testRuntime
                    }
        }
  dependencies
        {
            testCompile "junit:junit:4+"
            integrationTestCompile "org.spockframework:spock-core:0.7-groovy-2.0"
        }
  sourceSets
        {
            integrationTest
                    {
                        groovy.srcDir file("src/integration-test/src")
                        resources.srcDir file("src/integration-test/resources")
                        compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
                        runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
                    }
          }
    task wrapper(type: Wrapper) {
    gradleVersion = '1.4'
}
  task integrationTests(type: Test) {
    testClassesDir = sourceSets.integrationTest.output.classesDir
    classpath = sourceSets.integrationTest.runtimeClasspath
}
  check.dependsOn "integrationTests"

Thanks,

Ian.

You’ll have to configure separate 'reports.html.destination’s for the ‘test’ and ‘integrationTest’ tasks. To get a merged test report, disable report generation for the individual test tasks and add a task of type ‘TestReport’.

Where in the documentation would I find the instructions to disable report generation and add a task of type TestReport?

Here’s an example for aggregating test reports.