1

I have multiple test suites configured (as shown below) in my gradle build

task group1(type: Test) {
  useTestNG() {
    includeGroups 'group1'
  }
  // ... some excluded tests
  ext.useDefaultListeners = true
  ext.workingDirectory = 'build/'
  // ... some system properties required by this test
}

task group2(type: Test, dependsOn: group1) {
  useTestNG() {
    includeGroups 'group2'
  }
  // ... some excluded tests
  ext.useDefaultListeners = true
  ext.workingDirectory = 'build/'
  // ... some system properties required by this test
}

test.dependsOn group2

When I run the gradle clean build --debug, I could see after every test task (group1, group2 etc), gradle deletes the test report and regenerates it. Hence, after the build is done, whatever report I get does not have any information. All blank!

How can I get a combined report?

Thanks, NN

Niranjan
  • 2,601
  • 8
  • 43
  • 54
  • It's a duplicate of this: http://stackoverflow.com/questions/16921384/aggregating-gradle-multiproject-test-results-using-testreport Hope that helps! – Sharif Mamun May 03 '14 at 00:16
  • It is not. The link you gave shows example with `subproject` and I do not have any sub-projects; rather I have many test tasks. Can you show me how to define `reportOn` in my case? – Niranjan May 07 '14 at 05:31

1 Answers1

0

You should use a separate task of type TestReport

Check out section '23.12.7. Test reporting' in the user guide

Perryn Fowler
  • 2,192
  • 1
  • 12
  • 20