views:

967

answers:

1

Have been trying to get integration testing working with my seam project and the Jboss embedded container but am not having much success. Have been doing a lot of reading and have been trying what is mentioned in this JIRA but am not having any luck.

Amy currently just trying to get the 'testproject-master-JBSEAM-2371.zip' project working but am getting the following exception

ERROR [org.jboss.embedded.DeploymentScanner] Failed to deploy
org.jboss.deployers.spi.DeploymentException: No deployer recognised the structure of vfsfile:/Users/aaron/Development/eclipse_workspaces/workspace_pink/testproject-web/target/test-classes/conf/jboss-service.xml
    at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:219)
    at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)

Has oneone had any luck with getting the Seam integration tests working using maven and NOT a seam-gen project?

+3  A: 

I gave up on the embedded JBoss and switched with using the Maven JBoss Plugin to deploy to a JBoss instance started as a separate process. Not ideal but there were to many conflicts with our code and Maven to get around. Is there a reason you need the embedded version?

You should be able to do something like this to deploy to JBoss in the pre-integration test phase so the integration test could run against. You would still have to launch jboss before maven. Not ideal, but this is working for me.

       <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jboss-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>deploy</goal>
              </goals>
              <configuration>
                    <jbossHome>/opt/JBoss/current</jbossHome>
                    <port>8080</port>
              </configuration>
            </execution>
          </executions>
        </plugin>
sal
The only reason I was looking to use the embedded version is because that is what the Seam reference guide talks about for integration testing. Obviously, in order to test the integration of things like DAO's we need some sort of container for the tests to run in and instead of starting a container specifically to run tests, it would be good to have the embedded container started when maven runs the tests. This way, they can also be run during an automated build process.
Aaron Chambers
Thanks dood I'll give it a crack and see how it goes.
Aaron Chambers