diff --git a/build.gradle b/build.gradle index 724927507fb..3ddef1b2398 100644 --- a/build.gradle +++ b/build.gradle @@ -640,10 +640,22 @@ project("spring-webmvc-portlet") { project("spring-test") { description = "Spring TestContext Framework" + + task testNG(type: Test) { + useTestNG() + // "TestCase" classes are run by other test classes, not the build. + exclude "**/*TestCase.class" + // Generate TestNG reports alongside JUnit reports. + testReport true + } + test { + dependsOn testNG useJUnit() - useTestNG() + // "TestCase" classes are run by other test classes, not the build. + exclude "**/*TestCase.class" } + dependencies { compile(project(":spring-core")) optional(project(":spring-beans")) diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java index 05ba435f9b3..74e8f2513ad 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -237,8 +237,7 @@ public class FailingBeforeAndAfterMethodsTests { @BeforeTransaction public void beforeTransaction() { - // See SPR-8116 - //org.testng.Assert.fail("always failing beforeTransaction()"); + org.testng.Assert.fail("always failing beforeTransaction()"); } } @@ -251,8 +250,7 @@ public class FailingBeforeAndAfterMethodsTests { @AfterTransaction public void afterTransaction() { - // See SPR-8116 - //org.testng.Assert.fail("always failing afterTransaction()"); + org.testng.Assert.fail("always failing afterTransaction()"); } } diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/SPR-9398.txt b/spring-test/src/test/java/org/springframework/test/context/testng/SPR-9398.txt deleted file mode 100644 index dfbdc9ad831..00000000000 --- a/spring-test/src/test/java/org/springframework/test/context/testng/SPR-9398.txt +++ /dev/null @@ -1,3 +0,0 @@ -TODO [SPR-9398] re-enable TestNG support for spring-test. - -These TestNG test classes are currently not run at all.