[testng] 77/355: It's old test, not worked for long time. Finally fixed
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:19:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.
commit 18c821d6eaaa8ab24f5b949b16dae08685f86cbf
Author: Vladislav Rassokhin <vladrassokhin at gmail.com>
Date: Sat Nov 15 09:06:51 2014 +0300
It's old test, not worked for long time. Finally fixed
---
.../java/test/testng106/FailingSuiteFixture.java | 9 +-------
src/test/java/test/testng106/TestNG106.java | 25 ++++++++++++++++++++++
src/test/java/test/testng106/testng-106.xml | 25 ----------------------
src/test/resources/testng.xml | 6 ++++++
4 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/src/test/java/test/testng106/FailingSuiteFixture.java b/src/test/java/test/testng106/FailingSuiteFixture.java
index 8843dfa..2144de0 100644
--- a/src/test/java/test/testng106/FailingSuiteFixture.java
+++ b/src/test/java/test/testng106/FailingSuiteFixture.java
@@ -1,7 +1,5 @@
package test.testng106;
-import org.testng.Assert;
-import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
@@ -13,11 +11,6 @@ public class FailingSuiteFixture {
@BeforeSuite
public void failingBeforeSuite() {
- }
-
- @AfterSuite(alwaysRun=true)
- public void afterSuite() {
- System.out.println("Invocations:" + s_invocations + " must be 0");
- Assert.assertEquals(s_invocations, 0, "@BeforeSuite has failed. All tests should be skipped.");
+ throw new RuntimeException();
}
}
diff --git a/src/test/java/test/testng106/TestNG106.java b/src/test/java/test/testng106/TestNG106.java
new file mode 100644
index 0000000..92c883f
--- /dev/null
+++ b/src/test/java/test/testng106/TestNG106.java
@@ -0,0 +1,25 @@
+package test.testng106;
+
+import org.testng.Assert;
+import org.testng.TestNG;
+import org.testng.annotations.Test;
+import org.testng.xml.XmlSuite;
+import test.SimpleBaseTest;
+
+import java.util.Arrays;
+
+public class TestNG106 extends SimpleBaseTest {
+ @Test
+ public void testFailingBeforeSuiteShouldSkipAllTests() throws Exception {
+ TestNG tng = create();
+ XmlSuite s = createXmlSuite("TESTNG-106");
+ createXmlTest(s, "myTest1", FailingSuiteFixture.class.getName(), Test1.class.getName());
+ createXmlTest(s, "myTest2", Test1.class.getName());
+ createXmlTest(s, "myTest3", Test2.class.getName());
+ createXmlTest(s, "myTest-last", Test2.class.getName());
+ tng.setXmlSuites(Arrays.asList(s));
+ tng.setVerbose(3);
+ tng.run();
+ Assert.assertEquals(FailingSuiteFixture.s_invocations, 0, "@BeforeSuite has failed. All tests should be skipped.");
+ }
+}
diff --git a/src/test/java/test/testng106/testng-106.xml b/src/test/java/test/testng106/testng-106.xml
deleted file mode 100644
index 25b6bf9..0000000
--- a/src/test/java/test/testng106/testng-106.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-
-<suite name="TESTNG-106" verbose="3">
- <test name="myTest1">
- <classes>
- <class name="test.testng106.FailingSuiteFixture" />
- <class name="test.testng106.Test1"/>
- </classes>
- </test>
- <test name="myTest2">
- <classes>
- <class name="test.testng106.Test1"/>
- </classes>
- </test>
- <test name="myTest3">
- <classes>
- <class name="test.testng106.Test2"/>
- </classes>
- </test>
- <test name="myTest-last">
- <classes>
- <class name="test.testng106.Test2"/>
- </classes>
- </test>
-</suite>
\ No newline at end of file
diff --git a/src/test/resources/testng.xml b/src/test/resources/testng.xml
index ca8b566..7019994 100644
--- a/src/test/resources/testng.xml
+++ b/src/test/resources/testng.xml
@@ -731,5 +731,11 @@
</classes>
</test>
+ <test name="TESTNG-106">
+ <classes>
+ <class name="test.testng106.TestNG106"/>
+ </classes>
+ </test>
+
</suite>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list