- Test-Driven Java Development(Second Edition)
- Alex Garcia Viktor Farcic
- 113字
- 2021-06-24 18:31:48
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:
- Add the Gradle plugin for JaCoCo:
apply plugin: 'jacoco'
- To see the JaCoCo results, run the following from your command prompt:
gradle test jacocoTestReport
- The same Gradle tasks can be run from the Gradle Tasks IDEA Tool Window.
- 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.
推薦閱讀
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- JavaScript從入門到精通(微視頻精編版)
- Spring 5企業級開發實戰
- Moodle Administration Essentials
- Mastering phpMyAdmin 3.4 for Effective MySQL Management
- 深入淺出Java虛擬機:JVM原理與實戰
- C語言程序設計(第2版)
- Python機器學習編程與實戰
- Learning Python by Building Games
- C語言程序設計
- 編程數學
- Spring+Spring MVC+MyBatis從零開始學
- Unity Character Animation with Mecanim
- Learning Nessus for Penetration Testing
- After Effects CC技術大全