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

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.

主站蜘蛛池模板: 沂南县| 慈溪市| 涡阳县| 甘泉县| 霞浦县| 黑龙江省| 曲松县| 潮安县| 台前县| 分宜县| 武川县| 正宁县| 施秉县| 阜宁县| 彩票| 东兴市| 正镶白旗| 两当县| 阿尔山市| 濉溪县| 湖南省| 山阳县| 上栗县| 昌平区| 奉新县| 永平县| 东辽县| 浦城县| 烟台市| 揭东县| 大邑县| 绵竹市| 全南县| 亳州市| 高尔夫| 崇左市| 沙洋县| 章丘市| 福州市| 城市| 丰宁|