I have a gradle reports(HTML based) generated and available in a zip archive. Is there a way in gradle where I can provide a list of archived reports and generate one consolidated report. To use gradle task I have to have them as subprojects which I do not and to use ant Junit task to aggregate reports, I have the reports in Gradle HTML format. So I am not sure what the solution might be. ANT might be right solution for this but I have not seen any solution so far.
Appreciate your time for reading this post, please let me know if you solution.
Thank you very much, this solved my problem. Here is the code that worked for me. I just copied all the binary directories to a folder and then run the below task.
This is a consolidation task and I do not need to run any tests. So I have a folder with all the test results that were run on the remote machines and all I am doing here is pointing to that folder which has the binary files and provide me a consolidated report.
Alternatively, you can merge Gradle unit test HTML reports for all subprojects into a single index.html file placing the following in your root build.gradle file.
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Combine all 'test' task results into a single HTML report
reportOn subprojects.collect { it.tasks.withType(Test) }
}
This results should be available at build/reports/allTests/index.html
Thanks twiatedpair.
Could you please help me a more to incorporate this into my test.
I am using .csv file to write passed/fail once a test case is executed. what should i change in this to generate html report having total no. of test cases, passed and failed count.
What changes are required in this line:
subprojects.collect { it.tasks.withType(Test)}
As of now, it didn’t generate any report in this location.