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

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.

主站蜘蛛池模板: 永和县| 广河县| 武夷山市| 温宿县| 军事| 博湖县| 万盛区| 富锦市| 平利县| 桦川县| 天等县| 乐平市| 新蔡县| 金阳县| 桓仁| 兰考县| 安顺市| 安达市| 阳新县| 比如县| 黄山市| 西林县| 黄石市| 孟州市| 资阳市| 扶风县| 内江市| 白河县| 贡嘎县| 昌都县| 十堰市| 钟山县| 丽水市| 平定县| 喀什市| 新龙县| 溧阳市| 天镇县| 广元市| 寻乌县| 微博|