From 098d7c746532135e0edc241d91dfc1f27389949d 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 --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 517d59a463..87aa765f46 100644 --- a/build.gradle +++ b/build.gradle @@ -826,19 +826,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. getReports().getHtml().setEnabled(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"]) }