'setUp method: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows:
When I am running Selenium-Webdriver scripts in Eclipse, it works fine. But the same scripts are running in jenkins in server machine, it is giving the following error:
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: [email protected] [email protected]
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: [email protected] [email protected]
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
This the Error i am getting in porm.xml selenium.server version is 2.33.0 and Firefox version in server is 10.0. From 3 days i am getting this problem, before it runs fine. Why it is running in Local machine and Why it is not running in Jenkins.
Solution 1:[1]
I had this problem after updating Ubuntu. My problem was that the Firefox version was different, to prevent the issue in future turn off automatic updates.
This helped fixed the problem for me: Failed to connect to binary FirefoxBinary with Selenium in Maven
Solution 2:[2]
First fix your Firefox version and selenium version match by testing it locally. If you are running job through Jenkins and in the logs you are getting error Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: Error: cannot open display: :0
To resolve look below steps:
1) Firefox will launch only if you have Xvfb running,
example: Xvfb :15 -screen 0 1024x768x16 so check this first, this check you
could include into job by adding ps -ef into pre-steps (shell execution) of
job.
2) Even if you would have define explicitly the DISPLAY value but you have still error then the best method is to inject as a environmental value in Jenkin job itself. Under Build environment >> Inject env variables >> Properties content >> DISPLAY=:15 (Display you could have as per your choice but same should be running in xvfb)
!! Run your job, should have been fix.
Solution 3:[3]
Try to use the following:
System.setProperty("webdriver.firefox.bin","C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Community |
Solution 2 | |
Solution 3 | me_digvijay |