If one of my test groups don’t have a test the report fails. Is there a new way to code the report task or another way to fixs this.
- What went wrong: Execution failed for task ‘:testReport’. > java.io.FileNotFoundException: D:\repos..\core\build\test-results\binary\performanceTest\results.bin (The system cannot find the path specified)
Taks on all sub projects.
task performanceTest(type: Test) {
include '**/*PerformanceTest.*'
}
task integrationTest(type: Test) {
useTestNG()
include '**/*IntegrationTest.*'
}
check.dependsOn
performanceTest, integrationTest
tasks.withType(Test) { task ->
reports.html.destination = file("$buildDir/reports/$task.name")
}
Taks only in root project
task testReport(type: TestReport) {
def tests = [];
subprojects.each {project -> tests.add(project.tasks.withType(Test))}
reportOn tests
destinationDir = file("${buildDir}/reports/test")
}