[
http://jira.jboss.com/jira/browse/JBSEAM-1371?page=comments#action_12372077 ]
RefuX Zanzeebarr commented on JBSEAM-1371:
------------------------------------------
To save you 30 seconds of you life, the non-deprecated version:
@Test(groups="base")
public class SomeBaseTest
extends SeamTest
{
@BeforeTest
public void begin() {
super.begin();
}
@AfterTest
public void end() {
super.end();
}
@BeforeClass
public void init() throws Exception {
super.init();
}
@AfterClass
public void cleanup() throws Exception
{
super.cleanup();
}
}
Unable to use TestNG groups with SeamTest
-----------------------------------------
Key: JBSEAM-1371
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1371
Project: JBoss Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 1.2.1.GA
Reporter: Samuel Mendenhall
Priority: Minor
testng xml in build.xml
++++++++++++++++++++++++++++++
<testng outputdir="${basedir}/test-report"
groups="SomeGroups">
<classfileset dir="classes"
includes="**/*.class" />
<classpath path="${test.dir}" />
<classpath path="${embedded-ejb3.dir}" />
<classpath refid="build.classpath" />
</testng>
++++++++++++++++++++++++++++++
EmptyTest.java
++++++++++++++++++++++++++++++
public class EmptyTest extends SeamTest {
@Test(groups = {"SomeGroups"})
public void testNothing() throws Exception {
new FacesRequest() {
@Override
protected void invokeApplication() throws Exception {
assert true;
}
}.run();
}
@Test
public void testNothingAgain() throws Exception {
assert true;
}
}
++++++++++++++++++++++++++++++
command:
++++++++++++++++++++++++++++++
ant test
++++++++++++++++++++++++++++++
Exception:
++++++++++++++++++++++++++++++
[testng] java.lang.NullPointerException
[testng] at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:418)
[testng] at com.mydomain.convotest.EmptyTest.testNothing(EmptyTest.java:10)
..
++++++++++++++++++++++++++++++
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira