[jboss-user] [JBoss Seam] - Issues regarding integration testing using seam-gen

zzztimbo do-not-reply at jboss.com
Fri Oct 12 23:19:36 EDT 2007


I used seam-gen to create my Eclipse project. 

Here is my single test:



  | package com.mcc.test;
  | 
  | 
  | import org.jboss.seam.mock.SeamTest;
  | import org.testng.annotations.Test;
  | 
  | 
  | public class TestTest extends SeamTest {
  | 
  | 	@Test
  | 	public void testNothing() {
  | 		assert "foo".equalsIgnoreCase("FOO");
  | 	}
  | }
  | 


When I use the testng plugin for Eclipse, I get the follow error:


  | FAILED CONFIGURATION: @BeforeClass init
  | java.lang.RuntimeException: Could not create Component: renderManager
  | 	at org.jboss.seam.init.Initialization.addComponent(Initialization.java:964)
  | 	at org.jboss.seam.init.Initialization.installComponents(Initialization.java:891)
  | 	at org.jboss.seam.init.Initialization.init(Initialization.java:547)
  | 	at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:900)
  | 	at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
  | Caused by: java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ScheduledThreadPoolExecutor
  | 	at java.lang.Class.getDeclaredMethods0(Native Method)
  | 	at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
  | 	at java.lang.Class.getDeclaredMethods(Class.java:1763)
  | 	at org.jboss.seam.Component.initMembers(Component.java:546)
  | 	at org.jboss.seam.Component.<init>(Component.java:254)
  | 	at org.jboss.seam.Component.<init>(Component.java:217)
  | 	at org.jboss.seam.init.Initialization.addComponent(Initialization.java:949)
  | 	... 26 more
  | ... Removed 22 stack frames
  | SKIPPED CONFIGURATION: @BeforeMethod begin
  | SKIPPED CONFIGURATION: @AfterMethod end
  | SKIPPED CONFIGURATION: @AfterClass cleanup
  | SKIPPED: testNothing
  | 


When I issue "ant buildtest" and then "ant test" I get the follow errors, which are different:


  |  [testng] FAILED CONFIGURATION: @BeforeClass init
  |    [testng] java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
  |    [testng]     at org.jboss.util.collection.CollectionsFactory.createConcurrentReaderMap(CollectionsFactory.java:73)
  |    [testng]     at org.jboss.kernel.plugins.event.AbstractEventEmitter.<init>(AbstractEventEmitter.java:60)
  |    [testng]     at org.jboss.kernel.plugins.AbstractKernelObject.<init>(AbstractKernelObject.java:47)
  |    [testng]     at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.<init>(AbstractBootstrap.java:51)
  |    [testng]     at org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap.<init>(BasicBootstrap.java:58)
  |    [testng]     at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:130)
  |    [testng]     at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:76)
  |    [testng]     at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
  |    [testng]     at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:967)
  |    [testng]     at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:892)
  |    [testng]     at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
  |    [testng] ... Removed 22 stack frames
  |    [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
  |    [testng] SKIPPED CONFIGURATION: @AfterMethod end
  |    [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
  |    [testng] SKIPPED: testNothing
  | 
  | 

Another issue I have is the ant buildtest target looks for a testng xml file of the pattern *Test.xml. In the examples directory of Seam, all the projects I found had a testng xml file, "testng.xml." So in order to run the testng test from ant, I had to rename my testng xml file. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094830#4094830

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094830



More information about the jboss-user mailing list