eclipse - "Couldn' t 连接到 RemoteTestNG 客户端”在 OSX-mountain-lion 上启动 TestNG 时

标签 eclipse maven selenium osx-mountain-lion testng

我正在尝试使用 Eclipse、Selenium、Maven 和 TestNG 运行最基本的示例测试。我可以使用 Eclipse(或 IntelliJ)、Selenium 和 Maven 运行测试(jUnit 也可以),但是当我尝试添加 TestNG 时,我得到以下结果:

“无法连接到 RemoteTestNG 客户端。请确保类路径上没有旧版本的 testng.jar。原因:尝试联系 RemoteTestNG 时超时。”

我已经遵循了几个教程和 YouTube 演练。我在 Windows 7 虚拟机上执行了相同的步骤,第一次就成功了,所以我认为我的配置正确(即类路径)。

我看到还有其他类似的主题:
Timeout while trying to contact RemoteTestNG in Selenium on Mac
"Couldn't contact the RemoteTestNG client" error when trying to run tests

但他们很旧,似乎没有具体回答我的问题。

我以前从未使用过这些工具,对 Mac 也不是很熟悉,所以到目前为止,我还无法尝试从命令行运行相同的东西,因为我不知道到底要执行什么命令使用。

我是否缺少某些内容或需要执行某些操作才能使 TestNG 正常工作?否则,我将不得不始终使用 Windows VM,这将是一件痛苦的事情。

环境:
操作系统:OS X 10.8.5
测试NG:6.8
适用于 Java 的 Eclipse IDE:Kepler SR1
Selenium :2.38.0
Java:1.7.0_45

感谢您的宝贵时间。

最佳答案

  1. 导航至:

    Project -> properties ->TestNG
    
  2. 取消选择该选项:

    Use Project TestNg jar.
    

这解决了我的问题。

关于eclipse - "Couldn' t 连接到 RemoteTestNG 客户端”在 OSX-mountain-lion 上启动 TestNG 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20552090/

相关文章:

eclipse - 无法使用 EGit 克隆远程 git 存储库

java - "The import java.awt cannot be resolved"和 "***** cannot be resolved to a type"

android - 在 "Auth failed"对话框之后,现在 EGit 不再询问用户名和密码

c# - Selenium 无法在此站点上找到元素

c# - DesiredCapabilities 已过时

Perl 和 Selenium::远程::驱动程序

php - 如何在 Eclipse 中设置 Zend Debugger?

java - 在生产中运行 jetty-maven-plugin

java - 通过 Google Cloud Dataflow 编写服务

git - 是否有自动增加 Maven 版本的好方法