Is there a way to have the plugin generate an `index.html`?
Is there a way to have the plugin generate an index.html? Or, even better, create a section in the index.html that Gradle produces that points to the overview-*.html that the plugin produces?
Alternatively, have the plugin set the outputs of the task generateCucumberReports.
How is that index.html generated by gradle? By which plugin?
It's part of the java plugin: https://docs.gradle.org/current/userguide/java_testing.html#test_reporting.
Alright, I see. I will look into it.
FYI and FWIW, the following is enough for my needs (since only Cucumber tests are run in functionalTest):
generateCucumberReports {
doLast {
new File("${buildDir}/reports/functionalTest/index.html").text = '<meta http-equiv="refresh" content="0; URL=\'cucumber-html-reports/overview-features.html\'"/>'
}
}
That's generated by the Java Plugin: https://docs.gradle.org/current/userguide/java_testing.html#test_reporting
FYI and FWIW, the following does what I need (since only Cucumber tests run under the functionalTest task):
generateCucumberReports {
doLast {
new File("${buildDir}/reports/functionalTest/index.html").text = '<meta http-equiv="refresh" content="0; URL=\'cucumber-html-reports/overview-features.html\'"/>'
}
}
It does not seem like gradle natively supports generation of custom reports beyond using binary results, so your solution seems to be the most viable at this point.