plugins {
    id 'org.springframework.boot' version '2.6.0'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
    id "org.flywaydb.flyway" version "8.1.0"
    id 'jacoco' // 새로 추가! 
}

jacoco {
    toolVersion = "0.8.7"
}

test {
    finalizedBy 'jacocoTestReport'
}

jacocoTestReport {
    reports {
        html.enabled true
        csv.enabled false
        xml.enabled false
    }
    finalizedBy 'jacocoTestCoverageVerification'
}

jacocoTestCoverageVerification {
    violationRules {
        rule {
            enabled = true
            element = 'CLASS'
            // includes = []

            limit {
                counter = 'LINE'
                value = 'COVEREDRATIO'
                minimum = 0.5
            }

            excludes = []
        }

        rule {

        }

    }
}

The JaCoCo Plugin

좌충우돌 jacoco 적용기

현재 50%를 넘어야 Build 가능 → 점차 80-90%로 늘리기👍👍

counter 협의 필요.

Untitled