Generate xml report for android Test task

Viewed 343

I am running ./gradlew DebugUnitTest task after completion its generating HTML report . is any way where I can generate XML report instead of HTML

2 Answers

They are already there. The HTML reports are located in app/build/reports/tests/, while the XML reports are in app/build/test-results

To activate xml test reports I had to add

tasks.withType<Test> {
    reports {
        junitXml.isEnabled = true
    }
}

to my gradle kotlin file. But they come in single xml files per test class.

Related