Jacoco 覆盖率报告未生成
温馨提示:
本文最后更新于 2024年04月12日,已超过 37 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我。
I am attempting to generate a coverage report using jacoco so I can use the coverage gutters extension in VSCode. Although my coverage report is not being generated at all and all I have is an empty jacoco file in my build directory.
Below is my current build.gradle
file:
plugins {
id "application"
id "jacoco"
}
apply plugin : "java"
apply plugin: 'jacoco'
repositories {
mavenCentral()
}
ext {
javaMainClass = "hw6.LegoPaths"
}
application {
mainClassName = javaMainClass
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
testImplementation 'org.hamcrest:hamcrest:2.2'
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
reports {
xml.required = true
csv.required = true
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}
Tests run fine when I run ./gradlew test jacocoTestReport
but no report is generated.
正文到此结束
- 本文标签: 家庭宠物
- 本文链接: https://www.coder6.net/article/2157
- 版权声明: 本文由蚂蚁原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权