feat : jacoco code Coverage ADD
This commit is contained in:
22
build.gradle
22
build.gradle
@@ -2,6 +2,7 @@ plugins {
|
|||||||
id 'org.springframework.boot' version '2.7.3'
|
id 'org.springframework.boot' version '2.7.3'
|
||||||
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
|
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
|
||||||
id 'java'
|
id 'java'
|
||||||
|
id 'jacoco'
|
||||||
id 'com.github.node-gradle.node' version '3.5.0'
|
id 'com.github.node-gradle.node' version '3.5.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,6 +87,27 @@ dependencies {
|
|||||||
testImplementation 'org.springframework.security:spring-security-test'
|
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') {
|
tasks.named('test') {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user