[jboss-user] [JBoss Seam] - Re: Problems running SeamTest's from mvn with Seam 2.0.0.Bet

charles.crouch@jboss.com do-not-reply at jboss.com
Mon Aug 13 16:28:00 EDT 2007


Sorry its taken me so long to reply to this.

So basically the steps that I needed to do were the following:


  | public class SeamHelper extends SeamTest 
  | {
  | ...
  |    @Override
  |    @BeforeClass
  |    public void init() throws Exception
  |    {
  |       // this is required to get vfs URLs (used by JBoss Embeddded) recognized
  |       // while executing the test
  |       org.jboss.net.protocol.URLStreamHandlerFactory factory
  |         = new org.jboss.net.protocol.URLStreamHandlerFactory();
  |       URL.setURLStreamHandlerFactory(factory);
  | 
  |       // set up anything else which is needed before Seam starts loading
  | 
  |       // do all the SeamTest set up
  |       super.init();
  |    }
  | ...
  | }

Then I have my tests extend SeamHelper rather than SeamTest

Then in src\test\resources I put a subset of files from the \bootstrap folder in jboss-seam-2.0.0.BETA1 distro (dont need all of them because not using EJB3 for example). The subset I needed were

jndi.properties
\conf\bootstrap-beans.xml
\conf\jboss-service.xml
\conf\jbossjta-properties.xml
\conf\login-config.xml

[Had to make changes to some of these files so as to remove the need for a deployers and deploy folder for example]

Then in my pom.xml I have the following as test dependencies, again from the Seam distro:

jboss-embedded-all.jar
thirdparty-all.jar


That should be it. Let me know how you get on.
Cheers



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

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



More information about the jboss-user mailing list