Skip to content

Commit 9213dba

Browse files
WeltraumschafManuelNeuer
authored andcommitted
#36 Ad code coverage to build
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
1 parent 6df0832 commit 9213dba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
id 'java'
77
id "io.freefair.lombok" version "6.5.1"
88
id 'maven-publish'
9+
id 'jacoco'
910
}
1011

1112
group 'io.securecodebox'
@@ -21,8 +22,7 @@ dependencies {
2122
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
2223
testImplementation 'org.springframework:spring-test:5.3.23'
2324
testImplementation 'org.hamcrest:java-hamcrest:2.0.0.0'
24-
25-
25+
testImplementation 'org.mockito:mockito-core:3.+'
2626

2727
implementation group: 'org.springframework', name: 'spring-web', version: '5.3.9'
2828
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
@@ -90,4 +90,10 @@ publishing {
9090

9191
test {
9292
useJUnitPlatform()
93+
finalizedBy jacocoTestReport
94+
}
95+
96+
// https://docs.gradle.org/current/userguide/jacoco_plugin.html
97+
jacocoTestReport {
98+
dependsOn test // tests are required to run before generating the report
9399
}

0 commit comments

Comments
 (0)