- 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.
推薦閱讀
- Web應(yīng)用系統(tǒng)開發(fā)實踐(C#)
- Python進階編程:編寫更高效、優(yōu)雅的Python代碼
- Getting Started with Gulp
- Building Wireless Sensor Networks Using Arduino
- Java Web應(yīng)用開發(fā)給力起飛
- Android Studio Cookbook
- ASP.NET 4.0 Web程序設(shè)計
- Application Development with Swift
- Ext JS 4 Plugin and Extension Development
- Unreal Engine Game Development Cookbook
- 川哥教你Spring Boot 2實戰(zhàn)
- Learning Swift
- Go語言從入門到進階實戰(zhàn)(視頻教學(xué)版)
- Mastering VMware Horizon 6
- Spring Boot實戰(zhàn):從0開始動手搭建企業(yè)級項目