简体   繁体   English

有没有人成功地与Jboss embedded,Seam和Maven进行集成测试?

[英]Has anyone successfully run integration tests with Jboss embedded, Seam and Maven?

Have been trying to get integration testing working with my seam project and the Jboss embedded container but am not having much success. 一直在尝试使用我的seam项目和Jboss嵌入式容器进行集成测试但是没有取得多大成功。 Have been doing a lot of reading and have been trying what is mentioned in this JIRA but am not having any luck. 一直在做很多阅读,并一直在尝试这个JIRA中提到但没有运气。

Amy currently just trying to get the 'testproject-master-JBSEAM-2371.zip' project working but am getting the following exception Amy目前只是试图让'testproject-master-JBSEAM-2371.zip'项目正常运行但是我得到了以下异常

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? 有没有人有幸使用maven而不是seam-gen项目进行Seam集成测试?

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. 我放弃了嵌入式JBoss,并使用Maven JBoss插件进行切换,以便作为一个单独的进程部署到一个JBoss实例。 Not ideal but there were to many conflicts with our code and Maven to get around. 不太理想,但是我们的代码与Maven之间存在很多冲突。 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. 你应该可以做这样的事情,在预集成测试阶段部署到JBoss,这样就可以运行集成测试。 You would still have to launch jboss before maven. 你仍然需要在maven之前启动jboss。 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM