testReport task does not run when tests fail ie aggregate report is not generated

When I run ‘gradle functionaltest’, it does not generate the aggregate report when some tests fail. Instead a report is generated for each respective module, which is written to build/reports. The aggregate report is only generated when all tests succeed. This is an example snippet of my code.

configure(SomeModules) {
    task functionaltest(type: Test){
        group = "Verification"
        description = "Run functional tests."
        scanForTestClasses = false
        include '**/*Suite.class'
    }
}
  task functionaltest(type: TestReport, dependsOn: ['copy_and_upgrade_config_files']) {
    destinationDir = file("functionalTestReports")
    reportOn SomeModules*.functionaltest
}

These tasks live in the root build gradle file. I tried running the task with ‘–continue’ but it does not fix my problem. Is there something wrong with my setup?

You’ll have to set the property ignoreFailures to ‘true’.

That worked. Thanks!

Also there was a talk that TestReport task should be associated with Test using finalizing dependencies but it is now done yet.