Browse Source

Merge branch '5.3.x'

pull/23432/head
Sam Brannen 3 years ago
parent
commit
cf46384887
  1. 1
      build.gradle
  2. 35
      spring-test/spring-test.gradle

1
build.gradle

@ -173,6 +173,7 @@ configure(allprojects) { project -> @@ -173,6 +173,7 @@ configure(allprojects) { project ->
exclude group: "junit", name: "junit"
}
dependency "org.testng:testng:7.4.0"
dependency "org.junit.support:testng-engine:1.0.1"
dependency "org.hamcrest:hamcrest:2.1"
dependency "org.awaitility:awaitility:3.1.6"
dependency "org.assertj:assertj-core:3.20.2"

35
spring-test/spring-test.gradle

@ -73,43 +73,24 @@ dependencies { @@ -73,43 +73,24 @@ dependencies {
testRuntimeOnly("org.junit.vintage:junit-vintage-engine") {
exclude group: "junit", module: "junit"
}
testRuntimeOnly("org.junit.support:testng-engine")
testRuntimeOnly("org.glassfish:jakarta.el")
testRuntimeOnly("com.sun.xml.bind:jaxb-core")
testRuntimeOnly("com.sun.xml.bind:jaxb-impl")
}
task junit(type: Test) {
description = "Runs JUnit 4 and JUnit Jupiter tests."
test {
description = "Runs JUnit 4, JUnit Jupiter, and TestNG tests."
useJUnitPlatform {
includeEngines "junit-vintage", "junit-jupiter", "testng"
excludeTags "failing-test-case"
}
// We use `include` instead of `filter.includeTestsMatching`, since
// the latter results in some tests being executed/reported
// multiple times.
include(["**/*Tests.class", "**/*Test.class"])
exclude(["**/testng/**/*.*"])
filter.excludeTestsMatching("*TestCase")
systemProperty("testGroups", project.properties.get("testGroups"))
// Java Util Logging for the JUnit Platform.
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
}
task testNG(type: Test) {
description = "Runs TestNG tests."
useTestNG()
include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
systemProperty("testGroups", project.properties.get("testGroups"))
// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
// testLogging.showStandardStreams = true
// forkEvery 1
}
test {
description = "Runs all tests."
dependsOn junit, testNG
exclude(["**/*.*"])
}
task aggregateTestReports(type: TestReport) {
description = "Aggregates JUnit and TestNG test reports."
destinationDir = test.reports.html.outputLocation.get().getAsFile()
reportOn junit, testNG
}
check.dependsOn aggregateTestReports

Loading…
Cancel
Save