官术网_书友最值得收藏!

JaCoCo

Java Code Coverage (JaCoCo) is a well-known tool for measuring test coverage.
To use it in our project, we need to add a few lines to our Gradle configuration file, that is, build.gradle:

  1. Add the Gradle plugin for JaCoCo:
apply plugin: 'jacoco'
  1. To see the JaCoCo results, run the following from your command prompt:
gradle test jacocoTestReport
  1. The same Gradle tasks can be run from the Gradle Tasks IDEA Tool Window.
  2. The end result is stored in the build/reports/jacoco/test/html directory. It's an HTML file that can be opened in any browser:

Further chapters of this book will explore code coverage in more detail. Until then, go to http://www.eclemma.org/jacoco/ for more information.

主站蜘蛛池模板: 阳江市| 乌什县| 黔南| 临潭县| 迁安市| 镇宁| 乃东县| 壤塘县| 乐昌市| 兴隆县| 阿勒泰市| 清涧县| 巫山县| 赤峰市| 兴仁县| 新余市| 沧州市| 龙川县| 白河县| 凤凰县| 抚顺县| 祁东县| 上虞市| 西林县| 华安县| 灵武市| 明水县| 阳春市| 三穗县| 门头沟区| 綦江县| 新晃| 鄂尔多斯市| 瓮安县| 小金县| 仪陇县| 石泉县| 陕西省| 南涧| 南丹县| 双流县|