-
1. Re: Dependent testing
pmuir Mar 10, 2008 12:21 PM (in response to larshuber)Please test in Seam trunk.
-
2. Re: Dependent testing
larshuber Mar 10, 2008 1:58 PM (in response to larshuber)I'm working with JBoss Developer Studion and it doesn't accept Seam 2.1
What can I do to solve this?
-
3. Re: Dependent testing
pmuir Mar 10, 2008 2:04 PM (in response to larshuber)Bug in JBDS. Create a Seam 2 project using Seam 2.0 and then replace the jars with the ones from Seam 2.1. Or use seam-gen.
-
-
5. Re: Dependent testing
pmuir Mar 10, 2008 10:07 PM (in response to larshuber)Great, I closed the issue.
-
6. Re: Dependent testing
larshuber Mar 11, 2008 8:12 AM (in response to larshuber)Hi Pete
I came across on strange behaviour with derived classes and dependent testing. By the way, the snapshot I'm using is Build 77 from 2.1
public class SimpleTest extends SeamTest { @BeforeMethod public void beforeMethod() { assert true; } @BeforeMethod(dependsOnMethods={"beforeMethod"}) public void postBeforeMethod() { assert true; } @Test public void testSimple() { assert true; } }
public class SimpleTestDerived extends SimpleTest { @Override @BeforeMethod public void beforeMethod() { super.beforeMethod(); assert true; } @Test public void testSimple2() { assert true; } }
org.testng.TestNGException: ch.pomop.testframework.test.SimpleTest.postBeforeMethod() is depending on nonexistent method ch.pomop.testframework.test.SimpleTest.beforeMethod at org.testng.internal.MethodHelper.findMethodsNamed(MethodHelper.java:143) at org.testng.internal.MethodHelper.topologicalSort(MethodHelper.java:472) at org.testng.internal.MethodHelper.sortMethods(MethodHelper.java:544) at org.testng.internal.MethodHelper.internalCollectAndOrderMethods(MethodHelper.java:77) at org.testng.internal.MethodHelper.collectAndOrderConfigurationMethods(MethodHelper.java:61) at org.testng.internal.TestNGMethodFinder.findConfiguration(TestNGMethodFinder.java:192) at org.testng.internal.TestNGMethodFinder.getBeforeTestMethods(TestNGMethodFinder.java:64) at org.testng.TestClass.initMethods(TestClass.java:150) at org.testng.TestClass.init(TestClass.java:74) at org.testng.TestClass.<init>(TestClass.java:43) at org.testng.TestRunner.initMethods(TestRunner.java:288) at org.testng.TestRunner.init(TestRunner.java:216) at org.testng.TestRunner.init(TestRunner.java:178) at org.testng.TestRunner.<init>(TestRunner.java:139) at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:102) at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:154) at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:494) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:235) at org.testng.SuiteRunner.run(SuiteRunner.java:191) at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808) at org.testng.TestNG.runSuitesLocally(TestNG.java:776) at org.testng.TestNG.run(TestNG.java:701) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
As you can see the derived class overrides beforeMethod() from the subclass. Now on startup testing an exception occures: the method beforeMethod() on which postBeforeMethod() is depending on is missing. But in reality the method will be called in the subclass.
Is this wanted that you have to override all depending methods or is it just not implemented yet?
By the way - testing with 2.1 is much faster. Initialization time is little bit longer but the Test execution time is much shorter. I hope this is because of reengineering and not because of missing parts of the snapshot.
greets
Lars -
7. Re: Dependent testing
larshuber Mar 11, 2008 11:38 AM (in response to larshuber)EDIT:
As you can see the derived class overrides beforeMethod() from superclass.
-
8. Re: Dependent testing
pmuir Mar 11, 2008 12:33 PM (in response to larshuber)
Lars Huber wrote on Mar 11, 2008 08:12 AM:
As you can see the derived class overrides beforeMethod() from the subclass. Now on startup testing an exception occures: the method beforeMethod() on which postBeforeMethod() is depending on is missing. But in reality the method will be called in the subclass.
Is this wanted that you have to override all depending methods or is it just not implemented yet?I'm pretty sure this is a limitation in TestNG not Seam test right? So ask there ;-)
By the way - testing with 2.1 is much faster. Initialization time is little bit longer but the Test execution time is much shorter. I hope this is because of reengineering and not because of missing parts of the snapshot.
Yes, this was the intention of the refactor :-)