Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 安装方法:无法连接到端口7055上的二进制FirefoxBinary(/usr/bin/firefox);过程输出如下:_Java_Firefox_Selenium_Jenkins_Webdriver - Fatal编程技术网

Java 安装方法:无法连接到端口7055上的二进制FirefoxBinary(/usr/bin/firefox);过程输出如下:

Java 安装方法:无法连接到端口7055上的二进制FirefoxBinary(/usr/bin/firefox);过程输出如下:,java,firefox,selenium,jenkins,webdriver,Java,Firefox,Selenium,Jenkins,Webdriver,当我在Eclipse中运行SeleniumWebDriver脚本时,它工作得很好。但相同的脚本在服务器机器的jenkins中运行,它给出了以下错误: 18:00:34 ------------------------------------------------------- 18:00:34 T E S T S 18:00:34 ------------------------------------------------------- 18:00:35 Running TestSuit

当我在Eclipse中运行SeleniumWebDriver脚本时,它工作得很好。但相同的脚本在服务器机器的jenkins中运行,它给出了以下错误:

18:00:34 -------------------------------------------------------
18:00:34  T E S T S
18:00:34 -------------------------------------------------------
18:00:35 Running TestSuite
18:12:46 Tests run: 568, Failures: 16, Errors: 0, Skipped: 552, Time elapsed: 731.137          sec <<< FAILURE!
18:12:46 
18:12:46 Results :
18:12:46 
18:12:46 Failed tests:   setUp(com.abcd.fe.web.integration.myaccount.test.SettingsPageTest): Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
18:12:46   setUp(com.abcd.fe.web.integration.footer.test.FooterMenuBottomTest): Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
18:12:46   setUp(com.abcd.fe.web.integration.help.test.HelpPageTest): Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
18:12:46   setUp(com.abcd.fe.web.integration.myaccount.test.MyAccountPageTest): Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
18:12:46   setUp(com.abcd.fe.web.integration.loginsignup.test.SignupPageTest): Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 

18:12:46 
18:12:46 Tests run: 568, Failures: 16, Errors: 0, Skipped: 552
18:12:46 
18:12:46 [ERROR] There are test failures.
18:12:46 
18:12:46 Please refer to /var/lib/jenkins/jenkins/workspace/fe-abcd-xyz- integration-test/target/surefire-reports for the individual test results.
18:12:46 [JENKINS] Recording test results
18:12:48 [INFO] 
18:12:48 [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ abcd-xyz-test ---
18:12:48 [INFO] Installing /var/lib/jenkins/jenkins/workspace/fe-abcd-xyz-integration-test/target/abcd-xyz-test-2.0.0-SNAPSHOT.jar to /home/jenkins/.m2/repository/com/abcd/test/fe/functional/abcd-xyz-test/2.0.0-SNAPSHOT/abcd-xyz-test-2.0.0-SNAPSHOT.jar
18:12:48 [INFO] Installing /var/lib/jenkins/jenkins/workspace/fe-abcd-xyz-integration-test/pom.xml to /home/jenkins/.m2/repository/com/abcd/test/fe/functional/abcd-xyz-test/2.0.0-SNAPSHOT/abcd-xyz-test-2.0.0-SNAPSHOT.pom
18:12:48 [INFO] ------------------------------------------------------------------------
18:12:48 [INFO] BUILD SUCCESS
18:12:48 [INFO] ------------------------------------------------------------------------
18:12:48 [INFO] Total time: 12:23.959s
18:12:48 [INFO] Finished at: Thu Aug 29 18:12:48 PDT 2013
18:12:48 [INFO] Final Memory: 25M/198M
18:12:48 [INFO] ------------------------------------------------------------------------
18:12:49 [JENKINS] Archiving disabled
18:12:49 Waiting for Jenkins to finish collecting data
18:12:49 Sending e-mails to: abcd-xyz-dev@abcd.com abcd-xyz-qa@abcd.com
18:12:49 channel stopped
18:12:49 [ANALYSIS-COLLECTOR] Computing warning deltas based on reference build #589
18:12:49 TestNG Reports Processing: START
18:12:49 Looking for TestNG results report in workspace using pattern: **/target/surefire-reports/testng-results.xml
18:12:49 Saving reports...
18:12:49 Processing '/var/lib/jenkins/jenkins/jobs/fe-abcd-xyz-integration-test/builds/2013-08-29_18-00-18/testng/testng-results.xml'
18:12:49 TestNG Reports Processing: FINISH
18:12:49 Sending e-mails to: abcd-xyz-dev@abcd.com abcd-xyz-qa@abcd.com
18:12:49 [ci-game] evaluating rule: Build result
18:12:49 [ci-game] evaluating rule: Increased number of failed tests
18:12:49 [ci-game] evaluating rule: Increased number of passed tests
18:12:49 [ci-game] evaluating rule: Decreased number of failed tests
18:12:49 [ci-game] evaluating rule: Decreased number of passed tests
18:12:49 [ci-game] evaluating rule: Open HIGH priority tasks
18:12:49 [ci-game] evaluating rule: Open NORMAL priority tasks
18:12:49 [ci-game] evaluating rule: Open LOW priority tasks
18:12:49 [ci-game] evaluating rule: PMD violation
18:12:49 [ci-game] evaluating rule: pylint violation
18:12:49 [ci-game] evaluating rule: CPD violation
18:12:49 [ci-game] evaluating rule: Checkstyle violation
18:12:49 [ci-game] evaluating rule: FindBugs violation
18:12:49 [ci-game] evaluating rule: FXCop violation
18:12:49 [ci-game] evaluating rule: Simian violation
18:12:49 [ci-game] evaluating rule: StyleCop violation
18:12:49 [ci-game] evaluating rule: HIGH priority PMD warnings
18:12:49 [ci-game] evaluating rule: NORMAL priority PMD warnings
18:12:49 [ci-game] evaluating rule: LOW priority PMD warnings
18:12:49 [ci-game] evaluating rule: New HIGH priority Findbugs warnings
18:12:49 [ci-game] evaluating rule: New NORMAL priority Findbugs warnings
18:12:49 [ci-game] evaluating rule: New LOW priority Findbugs warnings
18:12:49 [ci-game] evaluating rule: Fixed HIGH priority Findbugs warnings
18:12:49 [ci-game] evaluating rule: Fixed NORMAL priority Findbugs warnings
18:12:49 [ci-game] evaluating rule: Fixed LOW priority Findbugs warnings
18:12:49 [ci-game] evaluating rule: Changed number of compiler warnings
18:12:49 Notifying upstream projects of job completion
18:12:49 Finished: UNSTABLE

这是我在porm.xml selenium.server版本为2.33.0和服务器中的Firefox版本为10.0时遇到的错误。从3天开始,我就遇到了这个问题,在它运行正常之前。为什么它在本地计算机中运行,为什么它不在Jenkins中运行。

请尝试使用以下方法:

System.setProperty("webdriver.firefox.bin","C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");

尝试使用以下方法:

System.setProperty("webdriver.firefox.bin","C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");

我在更新Ubuntu后遇到了这个问题。我的问题是Firefox版本不同,为了防止将来出现问题,请关闭自动更新

这有助于解决我的问题:
更新Ubuntu后,我遇到了这个问题。我的问题是Firefox版本不同,为了防止将来出现问题,请关闭自动更新

这有助于解决我的问题:

首先通过本地测试修复Firefox版本和selenium版本的匹配。 如果您正在通过Jenkins运行作业,并且在日志中,您将得到错误信息 45000毫秒后无法连接到端口7055上的主机127.0.0.1。Firefox控制台输出:错误:无法打开显示::0

要解决此问题,请查看以下步骤:

1 Firefox只有在运行Xvfb时才会启动, 示例:Xvfb:15-屏幕0 1024x768x16,因此请先检查此项,然后检查您 可以通过将ps-ef添加到shell执行的预步骤中来包含到作业中 工作

2即使您已经明确定义了显示值,但仍然存在错误,那么最好的方法是在Jenkin作业本身中注入环境值。在Build environment>>Inject env variables>>Properties content>>DISPLAY=:15显示下,您可以根据自己的选择进行显示,但在xvfb中应该运行相同的显示


!!运行您的作业,应该已经修复。

首先通过本地测试修复您的Firefox版本和selenium版本匹配。 如果您正在通过Jenkins运行作业,并且在日志中,您将得到错误信息 45000毫秒后无法连接到端口7055上的主机127.0.0.1。Firefox控制台输出:错误:无法打开显示::0

要解决此问题,请查看以下步骤:

1 Firefox只有在运行Xvfb时才会启动, 示例:Xvfb:15-屏幕0 1024x768x16,因此请先检查此项,然后检查您 可以通过将ps-ef添加到shell执行的预步骤中来包含到作业中 工作

2即使您已经明确定义了显示值,但仍然存在错误,那么最好的方法是在Jenkin作业本身中注入环境值。在Build environment>>Inject env variables>>Properties content>>DISPLAY=:15显示下,您可以根据自己的选择进行显示,但在xvfb中应该运行相同的显示


!!运行您的作业,应该已经修复。

结果显示无法连接到二进制FirefoxBinary/usr/bin/firefox。确保这是服务器上firefox可执行文件的正确路径。是的/usr/bin/firefox是服务器上firefox的正确路径。也许这篇文章可以帮助你:嗨,Digvijay Yadav,我浏览了这个链接,我在设置一个显示环境,我可以知道如何设置以及使用什么值。我可以知道设置显示环境变量的目的吗?您使用的是什么操作系统?结果显示无法连接到二进制FirefoxBinary/usr/bin/firefox。确保这是服务器上firefox可执行文件的正确路径。是的/usr/bin/firefox是服务器上firefox的正确路径。也许这篇文章可以帮助你:嗨,Digvijay Yadav,我浏览了这个链接,我在设置一个显示环境,我可以知道如何设置以及使用什么值。我可以知道设置显示环境变量的目的吗?您使用的是什么操作系统?我尝试过使用这段代码,但仍然存在问题。它对我不起作用..我试过使用此代码,但问题仍然存在。这对我不起作用。。