Execute test suite in Gradle using JUnit Platform
Closes gh-23286
This commit is contained in:
parent
480b1e0a0d
commit
0aa5533dea
|
@ -76,6 +76,9 @@ configure(allprojects) { project ->
|
|||
generatedPomCustomization {
|
||||
enabled = false
|
||||
}
|
||||
imports {
|
||||
mavenBom "org.junit:junit-bom:${junit5Version}"
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
@ -134,6 +137,7 @@ configure(allprojects) { project ->
|
|||
systemProperty("java.awt.headless", "true")
|
||||
systemProperty("testGroups", project.properties.get("testGroups"))
|
||||
systemProperty("io.netty.leakDetection.level", "paranoid")
|
||||
useJUnitPlatform()
|
||||
scanForTestClasses = false
|
||||
include(["**/*Tests.class", "**/*Test.class"])
|
||||
// Since we set scanForTestClasses to false, we need to filter out inner
|
||||
|
@ -165,6 +169,10 @@ configure(allprojects) { project ->
|
|||
testCompile("io.mockk:mockk:1.9.3")
|
||||
testCompile("org.hamcrest:hamcrest-all:1.3")
|
||||
testCompile("org.assertj:assertj-core:3.12.2")
|
||||
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
|
||||
// so that we can run JUnit 4 tests in IDEs.
|
||||
testRuntime("org.junit.platform:junit-platform-launcher")
|
||||
testRuntime("org.junit.vintage:junit-vintage-engine")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
|
||||
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
|
||||
testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
|
||||
|
|
|
@ -79,11 +79,7 @@ dependencies {
|
|||
}
|
||||
testCompile("io.projectreactor.netty:reactor-netty")
|
||||
testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1")
|
||||
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
|
||||
// so that we can run JUnit 4 tests in IDEs.
|
||||
testRuntime("org.junit.jupiter:junit-jupiter-engine")
|
||||
testRuntime("org.junit.platform:junit-platform-launcher")
|
||||
testRuntime("org.junit.vintage:junit-vintage-engine")
|
||||
testRuntime("org.glassfish:javax.el:3.0.1-b08")
|
||||
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1")
|
||||
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")
|
||||
|
|
Loading…
Reference in New Issue