我的场景是启动arbillian测试在一个jboss管理。 其实我的耳朵已经部署在Jboss上,所以我没有在ShrinkWrap中放置任何存档。 我的测试在testng上运行。 要启动JBoss我提供了一个定制的Maven配置文件作为的Arquillian文档提示:arquillian testng测试不启动jboss管理
<profile>
<id>arquillian-jbossas-managed</id>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-web-6.0</artifactId>
<version>2.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
<version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
其实我的Jboss永远不会发生,我无法弄清楚发生了什么事情。 Maven调试不提供关于他试图启动老板的事实的任何信息。
Arquillian会触发服务器的启动吗? 有一些我可以依赖的钩子?
非常感谢
有趣的问题。所以我怎么理解这个工作是你选择你的容器连接器 - 你已经做了jboss-as-arquillian-container-managed。当你开始你的JUnit测试(拥有@RunWith(Arquillian.class))时,Arquillian将加载可用的连接器,在你的情况下它应该是被管理的连接器。我没有看到你的方案失败了吗?测试开始但没有打到连接拒绝? – dbalakirev
在我之前的评论中,我的意思是TestNG不是JUnit对不起。 – dbalakirev