Can't run Seam tests
zergspirit Feb 26, 2008 1:33 PMHi,
I'm trying to run tests using seam tests on my application, but I can't get it working.
At the beginning, Seam was just telling me I was missing a testng.xml file (which is odd since it's not written you need such a file in the docs), so I used one I found in the Seam examples.
Though, it still doesn't work, the test execution throwing me a pretty long exception:
[testng] [Parser] Running: [testng] /home/adrien/workspace/metabook/test-build/AllTest.xml [testng] WARN 26-02 11:05:00,955 [org.jboss.mx.loading.UnifiedLoaderRepository3.addClassLoader():713] Tried to add non-URLClassLoader. Ignored [testng] ERROR 26-02 11:05:01,316 [org.jboss.dependency.plugins.AbstractController.incrementState():755] Error installing to Described: name=SARDeployer state=PreInstall ... [testng] java. [testng] java.lang.RuntimeException: Unable to bootstrap: [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:147) [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183) [testng] at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195) [testng] at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11) [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1041) [testng] at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935) [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923) [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42) [testng] Caused by: org.jboss.kernel.spi.registry.KernelRegistryEntryNotFoundException: Entry not found with name: MainDeployer [testng] at org.jboss.kernel.plugins.registry.AbstractKernelRegistry.getEntry(AbstractKernelRegistry.java:89) [testng] at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:143) [testng] ... 29 more [testng] ... Removed 22 stack frames [testng] SKIPPED CONFIGURATION: @BeforeMethod begin [testng] SKIPPED CONFIGURATION: @AfterMethod end [testng] SKIPPED CONFIGURATION: @AfterClass cleanup [testng] SKIPPED: loginTestlang.RuntimeException: java.lang.reflect.UndeclaredThrowableException
My xml file is pretty simple:
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" > <suite name="Metabook" verbose="2" parallel="false"> <test name="Login"> <classes> <class name="com.lrb.metabook.test.LoginTest"/> </classes> </test> </suite>
Aswell as my test class, which is actually just trying to do a sysout at the moment:
package com.lrb.metabook.test; public class LoginTest extends SeamTest{ @Test public void loginTest(){ System.out.println("test...."); } }
Thanks for your help!