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

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.

主站蜘蛛池模板: 静乐县| 宾川县| 休宁县| 修水县| 阿勒泰市| 泽普县| 德钦县| 双柏县| 自治县| 卢氏县| 扬中市| 赤水市| 六盘水市| 仪陇县| 安仁县| 绥化市| 卓尼县| 高淳县| 昌江| 临沭县| 开鲁县| 万荣县| 平南县| 太仆寺旗| 婺源县| 秦安县| 绥中县| 开平市| 油尖旺区| 双辽市| 什邡市| 河东区| 仙游县| 封丘县| 三亚市| 南漳县| 壶关县| 凌源市| 长乐市| 浮梁县| 中方县|