Forum Discussion
Multiple file for single project? Strange.
Would you mind showing the below?
1. TEST-*.xml (you may replace orignal names with dummy
2. build.gradle file and what task are you calling?
This is files in report folder. It has all html and xml reports. Apart from this there is one subfolder which has couple of
supporting html files.
For 2nd point, I have got couple of report merger plugin. Need to check them and create task using those plugins.
https://github.com/bhovhannes/junit-report-merger#mergeFiles
- getarbind7 years agoOccasional Contributor
Hi nmrao
Here is the snapshot of build.gradle
=========================
def projectFilec = ["xyz", "xyz1", "xyz2", "xyz3", "xyz4"]
task myCopy(){
}def copycount = 1
projectFilec.each{ projectsFilec ->
task "myCopy${copycount}"(type: Copy){
from("${projectsFilec}")
into('AllReports')
include('TEST-*.xml')
}
myCopy.dependsOn "myCopy${copycount}"
copycount++
}task mergeJUnitReports {
ext {
resultsDir = file("AllReports")
targetDir = file("AllReports/merged/")
}doLast {
ant.taskdef(name: 'junitreport',
classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
classpath: configurations.antJUnit.asPath)ant.junitreport(todir: resultsDir) {
fileset(dir: resultsDir, includes: 'TEST-*.xml')
report(todir: targetDir, format: 'frames')
}
}
}===========================