Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
883 views
in Technique[技术] by (71.8m points)

junit - How to make Gradle build produce HTML test report instead of XML default?

Currently I build my Gradle app by running gradle clean build. This exercises JUnit tests and produces XML test results in my project under build/test-results. I would like to configure my build.gradle file to produce HTML test results (instead of the XML default). Is this possible, if so, how?

question from:https://stackoverflow.com/questions/25963554/how-to-make-gradle-build-produce-html-test-report-instead-of-xml-default

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
test {
    reports {
        junitXml.enabled = false
        html.enabled = true
    }               
}

To figure this out on your own, start from Test in the Gradle Build Language Reference, then drill down into (the type for) reports.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...