提交 0aa5533d 编写于 作者: S Sam Brannen

Execute test suite in Gradle using JUnit Platform

Closes gh-23286
上级 480b1e0a
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册