Integrate ant junit generated test-results in gradle test html report


(suman jakkula) #1

Is there a way to integrate ant jUnit results into gradle test report? I tried with TestReport task. But it seems it depends on “binary” files which are not generated when I run tests using ant.JUnitTask. ( I am using ant.JUnitTask to run tests from jars)

test <<
{
      //run ant junit task with reports stored in $buildDir/test-results
        //after ant junit completion and "test" task completion,
       //how can I get the gradle generated html report include the above test-results?
        }
task getReport( type: TestReport ) {
        destinationDir=file("$buildDir/reports/tests")
        reportOn tasks.test, files("$buildDir/test-results/binary/test")
 }

(Peter Niederwieser) #2

I don’t think there is a way to go from the XML test results to the HTML report. I think your best chance is to extract the test Jar and run the tests with Gradle’s ‘Test’ task.