feat: added new tests and coverage report

This commit is contained in:
Pierre Tellier
2025-03-11 13:00:38 +01:00
parent e3393c8834
commit a2e2395cc2
2 changed files with 60 additions and 5 deletions

View File

@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.4.2'
id 'io.spring.dependency-management' version '1.1.7'
id 'jacoco'
}
group = 'enseirb'
@ -36,3 +37,22 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
reports {
xml.required = false
csv.required = false
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}
jacoco {
toolVersion = "0.8.12"
reportsDirectory = layout.buildDirectory.dir('customJacocoReportDir')
}