From fdac4a7d188c0c99f2005fde6f2116d2ddea8038 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 21 Jan 2014 14:42:14 +0100 Subject: [PATCH] Ensure all tests in spring-test are executed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior to this commit TestNG tests would only be executed by the Gradle build if they were located in the “testng” package. Tests in subpackages would therefore be omitted from the build. This commit ensures that all TestNG classes in the “testng” package and any of its subpackages are executed in the Gradle build. Furthermore, this commit ensures that the JUnit-based FailingBeforeAndAfterMethodsTests test class is executed along with the other JUnit tests even though it resides under the “testng” package. Issue: SPR-11338 Backport-Commit: 098d7c746532135e0edc241d91dfc1f27389949d --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 2481d7587d1..6128ab42dcf 100644 --- a/build.gradle +++ b/build.gradle @@ -694,19 +694,23 @@ project("spring-test") { task testNG(type: Test) { useTestNG() + // forkEvery 1 scanForTestClasses = false - include "**/testng/*.*" + include "**/testng/**/*.*" exclude "**/FailingBeforeAndAfterMethodsTests.class" // "TestCase" classes are run by other test classes, not the build. exclude "**/*TestCase.class" // Generate TestNG reports alongside JUnit reports. testReport true + // show standard out and standard error of the test JVM(s) on the console + // testLogging.showStandardStreams = true } test { dependsOn testNG useJUnit() - exclude "**/testng/*.*" + exclude "**/testng/**/*.*" + include "**/testng/FailingBeforeAndAfterMethodsTests" // "TestCase" classes are run by other test classes, not the build. exclude(["**/*TestCase.class", "**/*TestSuite.class"]) }