From ff9b481a822b6615f1d7e9364f7e413473511eea Mon Sep 17 00:00:00 2001 From: minseokkang Date: Thu, 17 Nov 2022 18:09:29 +0900 Subject: [PATCH] feat : jacoco code Coverage ADD --- build.gradle | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build.gradle b/build.gradle index 52eb4f6..fa303f5 100644 --- a/build.gradle +++ b/build.gradle @@ -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() }