- 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.
推薦閱讀
- Learning Single:page Web Application Development
- 國際大學生程序設計競賽中山大學內部選拔真題解(二)
- Java入門經典(第6版)
- 實用防銹油配方與制備200例
- 編寫高質量代碼:改善C程序代碼的125個建議
- Mastering Rust
- Mastering Ext JS
- 軟件測試技術指南
- 表哥的Access入門:以Excel視角快速學習數據庫開發(第2版)
- Python忍者秘籍
- Unity 2017 Game AI Programming(Third Edition)
- JavaScript從入門到精通(視頻實戰版)
- iOS開發項目化入門教程
- Java Hibernate Cookbook
- MongoDB Cookbook