我遇到异常
FAILED CONFIGURATION: @BeforeSuite arquillianBeforeSuite
java.lang.NoSuchMethodError: org.jboss.remoting3.Endpoint.builder()Lorg/jboss/remoting3/EndpointBuilder;
at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:117)
at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:59)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:147)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:122)
使用 TestNG 和 wildfly11 在 Eclipse Oxygen 中运行 Arquillian 测试。 我的Maven配置如下:
<dependency>
<groupId>org.jboss.arquillian.testng</groupId>
<artifactId>arquillian-testng-container</artifactId>
<version>1.1.13.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>2.0.1.Final</version>
<scope>test</scope>
</dependency>
我也有同样的问题。我尝试了下面的解决方案,它对我来说就像一个魅力。 解决方案是:
将 TestNG 库添加到项目中。 步骤是:
再次尝试运行,就可以了。
注意:我使用的是 Java1.8 库(必须从 java1.5 更新它,因为我的 eclipse 使用默认的 1.5 创建项目)。
即使我在准备使用最新版本的 TestNG 时也遇到了同样的问题,但降级到较低版本的 TestNG 解决了问题。
当我在
TestNg
中添加pom.xml
依赖版本7.8.0时,我也遇到了类似的问题。
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.7.1</version>
<scope>test</scope>
</dependency>
解决方案是:
删除 Wildfly 11 运行时 来自类路径。
为什么这是必要的?欢迎评论...
将 testng 库添加到项目对我有用!
如果您正在开发 Maven 项目,请将您的 testng 版本升级到 7.1.0 及其测试范围。
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.1.0</version>
<scope>test</scope>
</dependency>
进入 eclipse 并检查已安装部分中的 testng 版本,只需将相同版本复制到 pom.xml 中 或者升级eclipse中testng的版本
可以通过2种方式解决:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.7.1</version>
<scope>test</scope>
</dependency>