feat : jacoco code Coverage ADD

This commit is contained in:
minseokkang
2022-11-17 18:09:29 +09:00
parent cfe4e8b0dd
commit ff9b481a82

View File

@@ -2,6 +2,7 @@ plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
id 'jacoco'
id 'com.github.node-gradle.node' version '3.5.0'
}
@@ -86,6 +87,27 @@ dependencies {
testImplementation 'org.springframework.security:spring-security-test'
}
jacoco {
toolVersion = "0.8.8"
reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
tasks.named('test') {
useJUnitPlatform()
}