Run Seam Tests from IntelliJ with TestNG plugin
schmurgon Mar 3, 2009 1:11 AMHas anyone managed to run the booking example tests from within IntelliJ IDEA 8.x using the TestNG plugin? I've tried averything I can think of with no success. I can run the ant test task from the Ant plugin and I've ensured that the tests work correctly.
Environment
= IntelliJ IDEA 8.1(with latest TestNG plugin)
= JDK 1.6.0_11
= Seam 2.1.1.GA
= Windows XP (or OSX 10.5.6 both have the same issue)
I have a project library which contains the entire contents of the seam/lib directory with the exception of the jboss-system.jar. It is a dependency of the booking module.
In the TestNG run/debug configuration:
VM Params
"-Dsun.lang.ClassLoader.allowArraySyntax true -Xbootclasspath/p:{seampath}/bootstrap;{seampath}/lib/test/*;"
Working Directory
"{seampath}/examples/booking/test-build"
Before Launch Section
Make
(selected)
Run Ant Target test (from the build.xml file in the examples/booking folder. I have removed the \\<testng\\> task from the test target since this should be performed by the plugin)
Exception:
java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:120)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:123)
at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:70)
at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:416)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:284)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:864)
at org.testng.TestNG.runSuitesLocally(TestNG.java:830)
at org.testng.TestNG.run(TestNG.java:748)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: java.lang.NullPointerException
at org.jboss.config.plugins.property.PropertyConfiguration.loadFromProperties(PropertyConfiguration.java:126)
at org.jboss.config.plugins.property.PropertyConfiguration.createDefaultClassAdapterFactory(PropertyConfiguration.java:86)
at org.jboss.config.plugins.AbstractConfiguration.getClassAdapterFactory(AbstractConfiguration.java:215)
at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:70)
at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:55)
at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:157)
at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:118)
at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
... 25 more
Environment
= IntelliJ IDEA 8.1(with latest TestNG plugin)
= JDK 1.6.0_11
= Seam 2.1.1.GA
= Windows XP (or OSX 10.5.6 both have the same issue)
I have a project library which contains the entire contents of the seam/lib directory with the exception of the jboss-system.jar. It is a dependency of the booking module.
In the TestNG run/debug configuration:
VM Params
"-Dsun.lang.ClassLoader.allowArraySyntax true -Xbootclasspath/p:{seampath}/bootstrap;{seampath}/lib/test/*;"
Working Directory
"{seampath}/examples/booking/test-build"
Before Launch Section
Make
(selected)
Run Ant Target test (from the build.xml file in the examples/booking folder. I have removed the \\<testng\\> task from the test target since this should be performed by the plugin)
Exception:
java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:120)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:123)
at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:70)
at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:416)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:284)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:864)
at org.testng.TestNG.runSuitesLocally(TestNG.java:830)
at org.testng.TestNG.run(TestNG.java:748)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: java.lang.NullPointerException
at org.jboss.config.plugins.property.PropertyConfiguration.loadFromProperties(PropertyConfiguration.java:126)
at org.jboss.config.plugins.property.PropertyConfiguration.createDefaultClassAdapterFactory(PropertyConfiguration.java:86)
at org.jboss.config.plugins.AbstractConfiguration.getClassAdapterFactory(AbstractConfiguration.java:215)
at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:70)
at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:55)
at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:157)
at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:118)
at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
... 25 more