Has anyone successfully run integration tests with

2019-03-28 08:04发布

问题:

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?

回答1:

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>