I have an app based as follows:
Spring Framework5.0.4.RELEASEGradle4.7 - multimodule project configured throughJUnit5.1.1
The configuration about Gradle with JUnit is in the build.gradle file located in the root module:
...
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.junit.platform.gradle.plugin'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
jcenter()
}
ext {
...
junitVersion = '5.1.1'
...
}
dependencies {
...
//Testing
...
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testCompile "org.junit.jupiter:junit-jupiter-params:$junitVersion";
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
....
}
test {
useJUnitPlatform()
}
}
//This location is mandatory
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.junit.platform:junit-platform-gradle-plugin:1.1.0"
}
}
Through Jenkins I execute:
gradle :thymeleaf-02-infrastructure:test --parallel- and with
Publish JUnit test result reportis configured tothymeleaf-02-infrastructure/build/test-results/junit-platform/*.xml
From above all work fine, I can see in Jenkins the @Test passed but Gradle does not generate the report directory with the expected html file.
Even if directly the gradle :thymeleaf-02-infrastructure:test --parallel command is executed in the terminal, all work (tests passe), but Gradle does not generate the report directory with the expected html file.
I already have read these links:
And well I am using
test {
useJUnitPlatform()
}
and Gradle is >4.6, 4.7, so what is missing?