gpt4 book ai didi

unit-testing - 有没有人成功地使用 Jboss 嵌入式、Seam 和 Maven 运行集成测试?

转载 作者:行者123 更新时间:2023-12-04 05:07:31 26 4
gpt4 key购买 nike

一直在尝试使用我的 Seam 项目和 Jboss 嵌入式容器进行集成测试,但没有取得多大成功。一直在做大量的阅读,并一直在尝试 this JIRA 中提到的内容但我没有任何运气。

艾米目前只是试图让“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)

有没有人使用 maven 而不是 seam-gen 项目让 Seam 集成测试工作?

最佳答案

我放弃了嵌入式 JBoss,转而使用 Maven JBoss Plugin部署到 JBoss 实例作为一个单独的过程开始。不理想,但与我们的代码和 Maven 之间存在许多冲突需要解决。您需要嵌入式版本有什么原因吗?

您应该能够在预集成测试阶段执行这样的操作以部署到 JBoss,以便集成测试可以运行。您仍然必须在 maven 之前启动 jboss。不理想,但这对我有用。

       <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>

关于unit-testing - 有没有人成功地使用 Jboss 嵌入式、Seam 和 Maven 运行集成测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/991992/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com