Jenkins Pipeline launches Protractor Selenium server, then freezes forever - linux

I'm trying to launch Protractor tests in a Jenkins Pipeline job.
I get a success message, but then the job hangs forever.
I'm running the build on an Ubuntu machine.
The build's logs...
[Bac à sable pipeline] Running shell script
+ sudo webdriver-manager update
[17:46:51] I/update - chromedriver: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29.zip
[17:46:51] I/update - chromedriver: unzipping chromedriver_2.29.zip
[17:46:52] I/update - chromedriver: setting permissions to 0755 for /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29
[17:46:52] I/update - chromedriver: chromedriver_2.29 up to date
[17:46:52] I/update - selenium standalone: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar
[17:46:52] I/update - selenium standalone: selenium-server-standalone-3.4.0.jar up to date
[17:46:53] I/update - geckodriver: file exists /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1.tar.gz
[17:46:53] I/update - geckodriver: unzipping geckodriver-v0.16.1.tar.gz
[17:46:53] I/update - geckodriver: setting permissions to 0755 for /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1
[17:46:53] I/update - geckodriver: geckodriver-v0.16.1 up to date
[Pipeline] sh
[Bac à sable pipeline] Running shell script
+ webdriver-manager start --seleniumPort 4445
[17:46:56] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29 -Dwebdriver.gecko.driver=/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1 -jar /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar -port 4445
[17:46:56] I/start - seleniumProcess.pid: 20154
17:46:58.246 INFO - Selenium build info: version: '3.4.0', revision: 'unknown'
17:46:58.247 INFO - Launching a standalone Selenium Server
2017-05-22 17:46:58.383:INFO::main: Logging initialized #1398ms to org.seleniumhq.jetty9.util.log.StdErrLog
17:46:58.669 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
17:46:58.687 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
17:46:58.687 INFO - Driver class not found: com.opera.core.systems.OperaDriver
17:46:58.688 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
17:46:58.688 INFO - Driver class not found: com.opera.core.systems.OperaDriver
17:46:58.691 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
17:46:58.701 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
2017-05-22 17:46:58.964:INFO:osjs.Server:main: jetty-9.4.3.v20170317
2017-05-22 17:46:59.226:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#475530b9{/,null,AVAILABLE}
2017-05-22 17:46:59.353:INFO:osjs.AbstractConnector:main: Started ServerConnector#393c0317{HTTP/1.1,[http/1.1]}{0.0.0.0:4445}
2017-05-22 17:46:59.356:INFO:osjs.Server:main: Started #2371ms
17:46:59.356 INFO - Selenium Server is up and running
EDIT:
Here are the Jenkins logs
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.335 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#22345313
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.336 INFO - Started HttpContext[/wd,/wd]
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.336 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.336 INFO - Started HttpContext[/,/]
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.340 INFO - Started SocketListener on 0.0.0.0:4444
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.344 INFO - Started org.openqa.jetty.jetty.Server#6eb7407d
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.375 INFO - Starting auto registration thread. Will try to register every 5000 ms.
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.376 INFO - Registering the node to the hub: http://mydomain.foobar:9093/grid/register
May 23, 2017 9:10:19 AM jenkins.model.Jenkins <init>
INFO: 09:10:19.431 INFO - The node is registered to the hub and ready to use
And the Jenkins Selenium Plugin logs:
May 23, 2017 9:10:19 AM org.openqa.grid.internal.Registry add
INFO: Registered a node http://172.17.0.1:4444
May 23, 2017 9:16:01 AM org.openqa.grid.internal.Registry add
INFO: Registered a node http://172.17.0.1:9095
This one, or this one, didn't help. Any ideas?

I managed to run the task without hang using this command:
xvfb-run -a webdriver-manager start --seleniumPort 4445 &
-a makes xvfb run on the first available display, and & makes this task run in the background.

Related

Jenkins GitHub Webhook not working

I am running Jenkins 2.89.4 on the official Docker LTS image in an Amazon Linux EC2 instance. I am using the GitHub webhook and when I test it I get this on the docker logs;
Feb 20, 2018 4:48:23 PM io.relution.jenkins.awssqs.logging.Log write
INFO: 000380 Create new SQSTriggerQueue(8d894fcf-becd-449c-a65b-2a404c57b7bc, , )
Feb 20, 2018 4:48:23 PM hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusiness queueChangeSet
INFO: Queue of changeset A hudson.scm.SubversionSCM.xml
A jenkins.model.ArtifactManagerConfiguration.xml
A hudson.tasks.Shell.xml
A scm-sync-configuration.xml
A hudson.tasks.Mailer.xml
A config.xml
A jenkins.plugins.awslogspublisher.AWSLogsConfig.xml
A hudson.plugins.jira.JiraProjectProperty.xml
A hudson.plugins.git.GitSCM.xml
A jenkins.metrics.api.MetricsAccessKey.xml
A hudson.plugins.timestamper.TimestamperConfig.xml
A jenkins.model.JenkinsLocationConfiguration.xml
A hudson.plugins.build_timeout.operations.BuildStepOperation.xml
A hudson.triggers.SCMTrigger.xml
A hudson.plugins.emailext.ExtendedEmailPublisher.xml
A hudson.maven.MavenModuleSet.xml
aborted (scm manipulator not settled !)
Feb 20, 2018 4:49:03 PM com.squareup.okhttp.internal.Platform$JdkWithJettyBootPlatform getSelectedProtocol
INFO: ALPN callback dropped: SPDY and HTTP/2 are disabled. Is alpn-boot on the boot class path?

Jenkins Slave Agent - Ubuntu: port out range:-1

I'm trying to get Jenkins slave agent running in VM. I have Windows and Ubuntu VMs, Windows one running fine. However getting an error when Slave Agent is starting on Ubuntu:
Start command:
java -jar slave.jar -jnlpUrl
https://SERVER/ci/computer/MACHINE/slave-agent.jnlp -secret XXX
Error:
Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
Sep 22, 2017 12:57:58 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: MACHINE
Sep 22, 2017 12:57:58 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Sep 22, 2017 12:57:58 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating SERVER among [https://SERVER/ci/]
Sep 22, 2017 12:57:59 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting SERVER accepts the following protocols: [JNLP4-connect, JNLP-connect, Ping, JNLP2-connect]
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
Agent address: SERVER
Agent port: 51967
Identity: XXX
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to SERVER:51967
Sep 22, 2017 12:57:59 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: port out of range:-1
java.lang.IllegalArgumentException: port out of range:-1
at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.getResolvedHttpProxyAddress(JnlpAgentEndpointResolver.java:359)
at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:193)
at hudson.remoting.Engine.connect(Engine.java:500)
at hudson.remoting.Engine.innerRun(Engine.java:364)
at hudson.remoting.Engine.run(Engine.java:287)
the error:
SEVERE: port out of range:-1
java.lang.IllegalArgumentException: port out of range:-1
any ideas?
Same for me, it was caused by proxy settings, I solved that adding NO_PROXY environment variable with appropriate hostname

Cannot create a new Browser using jxbrowser on linux

I have a small test program using jxbrowser working on a Mac. I am trying to run the test program on a Fedora install and I connot get an instance of a Browser object.
Here is the logging of the program. Does anyone have an idea of what can cause jxbrowser to fail creating the browser ?
-- Product name: JxBrowser
-- Licensed version: 6.x
-- Licensed to:
-- License type: Evaluation
-- Generation date: Feb 23, 2017
-- Expiration date: Mar 25, 2017
-- License info: Single-user license
-- Current date: Feb 28, 2017 JxBrowser license valid. 04:27:24 INFO: OS name: Linux 04:27:24 INFO: OS version:
4.8.6-300.fc25.x86_64 04:27:24 INFO: JRE version: 1.8.0_111 64-bit 04:27:24 INFO: JxBrowser version: 6.12 04:27:24 INFO: Temp: /tmp
16:27:24:208 INFO [main] (be.lyncos.ivista.tools.Test) - Before new
Browser 04:27:24 INFO: JxBrowser type: HEAVYWEIGHT 04:27:24 INFO:
Starting IPC... 04:27:24 INFO: Starting IPC Server... 04:27:24
INFO: Starting socket server 04:27:24 INFO: Starting socket server
at port 1101... 04:27:24 INFO: Starting IPC Process... 04:27:24
INFO: Starting Chromium process... 04:27:24 INFO: The
'/lib/x86_64-linux-gnu/libudev.so.0' library exists: FALSE 04:27:24
INFO: The '/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libudev.so.0'
library exists: TRUE 04:27:24 INFO: The
'/lib/x86_64-linux-gnu/libgcrypt.so.11' library exists: FALSE
04:27:24 INFO: The
'/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libgcrypt.so.11' library
exists: TRUE 04:27:24 INFO: The
'/lib/x86_64-linux-gnu/libcrypto.so.1.0.0' library exists: FALSE
04:27:24 INFO: The
'/tmp/jxbrowser-chromium-55.0.2883.87.6.12/libcrypto.so.1.0.0' library
exists: TRUE 04:27:24 INFO: Command line:
/tmp/jxbrowser-chromium-55.0.2883.87.6.12/jxbrowser-chromium
--port=1101 --pid=7360 --lang=en-us 04:27:24 INFO: [0228/172724:ERROR:browser_main_loop.cc(1426)] Unable to open X
display. 04:27:24 INFO: Shared Memory Name: JXB1-7360 04:27:24
INFO: IPC connection has been established. Connection ID:
140474291099776 04:27:24 INFO: READ: OnHelloMessage{type=OnHello,
uid=1, message='cid:0,type:Main', null 04:27:24 INFO: Channel has
been accepted: SocketChannel{cid=0, bid=-1, type=Main} 04:27:24
INFO: IPC is started. 04:27:24 INFO: WRITE:
CreateBrowserMessage{type=CreateBrowser, uid=1, channelId=0,
contextId=0, cacheDir='user-data-dir/Cache',
memoryDir='user-data-dir/Memory', dataDir='user-data-dir',
currentLocale='en-us', proxyType=-1, proxyRules='null',
proxyBypassRules='null', proxyAutoConfigURL='null',
defaultZoomLevel=0.0, isOffScreenMode=false, storageType=1,
SocketInfo{cid=0, bid=-1, channelType=Main} 04:27:25 INFO: Shutting
down event queue... 04:27:25 INFO: Shutting down event queue...
[DONE] 04:27:25 INFO: Shutting down event queue... 04:27:25 INFO:
Shutting down event queue... [DONE] 04:27:25 INFO: Channel has been
disconnected: SocketChannel{cid=0, bid=-1, type=Main} 04:27:25 INFO:
IPC connection has been closed. Connection ID: 140474291099776
04:27:25 INFO: Pending IPC connections: 0 04:27:25 INFO: Chromium
process exit code 139
com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 0
at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:396)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:207)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:178)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:145)
at be.lyncos.ivista.tools.Test.testJxBrowser(Test.java:6942)
at be.lyncos.ivista.tools.Test.main(Test.java:382)
16:29:24:674 ERROR [main] (be.lyncos.ivista.tools.Test) - Failed to get Browser browserChannel 0
com.teamdev.jxbrowser.chromium.internal.ipc.IPCException: Failed to get Browser browserChannel 0
at com.teamdev.jxbrowser.chromium.Browser.a(SourceFile:396)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:207)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:178)
at com.teamdev.jxbrowser.chromium.Browser.<init>(SourceFile:145)
at be.lyncos.ivista.tools.Test.testJxBrowser(Test.java:6942)
at be.lyncos.ivista.tools.Test.main(Test.java:382)
04:29:24 INFO: Stopping Server...
04:29:24 INFO: Stopping Server... [DONE]
04:29:24 INFO: Waiting process exit...
Thank you for your help,
Regards,
Christophe
Please make sure that your Linux environment isn't a headless environment. JxBrowser doesn't support headless linux environments without running X Server: https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013733-system-requirements

JADE Hangs when executed on 64Bit Linux at Agent Invocation

I've got a pesky issue I hope i can request some assistance from the community on....
I have a Ubuntu 12.04LTS 64 Bit linux server on which I run an instance of JADE (no gui) that creates a container and connects to a Main RMA on my local machine just fine. I see the container pop up and life is good. The problem is when I re-invoke that same instance using an Agent - it hangs. Note: I've recompiled the PingAgent Example on the 64Bit machine with the same vintage of Java (8) as on my workstation (windows). Is it a 32 vs 64 bit thing or are there issues with Jade on Linux?
Any assistance would be greatly appreciated ....
Below are the particulars:
Good instance (no agent, no hanging ):
RUN:
versaggi#drools:/usr/local/jade$ java -classpath lib/jade.jar:classes jade.Boot -container -local-host 50.116.61.17 -host versaggi.game-host.org -port 1099
Result:
Aug 12, 2014 7:35:42 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE 4.3.2 - revision 6708 of 2014/03/28 15:19:44
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
Aug 12, 2014 7:35:42 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://50.116.61.17:1099
Aug 12, 2014 7:35:43 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
Aug 12, 2014 7:35:43 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
Aug 12, 2014 7:35:43 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
Aug 12, 2014 7:35:43 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
Aug 12, 2014 7:35:43 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
Aug 12, 2014 7:35:43 PM jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Container-7#50.116.61.17 is ready.
--------------------------------------------
Bad Instance (Agent Included in invocation, hangs ....)
versaggi#drools:/usr/local/jade$ java -classpath lib/jade.jar:classes jade.Boot -container -local-host 50.116.61.17 -host versaggi.game-host.org -port 1099 -**agents** ping1:examples.PingAgent.PingAgent
Aug 12, 2014 7:34:25 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE 4.3.2 - revision 6708 of 2014/03/28 15:19:44
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
Aug 12, 2014 7:34:25 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://50.116.61.17:1099
Aug 12, 2014 7:34:26 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
Aug 12, 2014 7:34:26 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
Aug 12, 2014 7:34:26 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
Aug 12, 2014 7:34:26 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
Aug 12, 2014 7:34:26 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
**< *** HANGS HERE ***>**
**< *** KILLED FROM RAM HERE ***>**
Aug 12, 2014 7:34:36 PM jade.imtp.leap.NodeSkel executeCommand
WARNING: Error serving H-Command jade.core.management.AgentManagement/8: java.lang.NullPointerException
Aug 12, 2014 7:34:36 PM jade.core.messaging.MessageManager shutdown
INFO: MessageManager shutting down ...
Aug 12, 2014 7:34:36 PM jade.core.Runtime$1 run
INFO: JADE is closing down now.
I have determined the source of the problem but not a solution, most likely because a solutions the this problem may not exist.
The JADE container will eventually complete in time (after a timeout period) but the Agent will NOT be instantiated (See bold error msg below).
The problem is that I am instantiating the Main container on a local PC behind a firewall on a private address 10.0.0.12 port 1099. The remote container is instantiated on a public Linux Server that actually correctly connects to my local PC via a port forward of 1099 rule in my local router to the IP of 10.0.0.12.
The real problem arises because the Main Container which controls the remote containers and thusly the agents dictates that the agent communication must go through 10.0.0.12 port 1099 and conveys that to the remote container on the public linux server, which promptly tries to instantiate the agent communication through 10.0.0.12 port 1099....and consequently times out.
In the invoking JAVA call the option "-host 24.228.171.118 -port 1099" actually points to my router which does a port forward - it is NOT the IP of the PC initiating the Main container.
It appears that this particular set up does not work well inherently ....
You see the issue here ....
If there is a configuration option I can employ to change this (that anyone know of) I'd be grateful....
.
versaggi#drools:/usr/local/jade$ java -classpath lib/jade.jar:classes jade.Boot -container -local-host 50.116.61.17 -host 24.228.171.118 -port 1099 -agents ping1:examples.PingAgent.PingAgent
.
Aug 13, 2014 1:08:20 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
This is JADE 4.3.2 - revision 6708 of 2014/03/28 15:19:44
downloaded in Open Source, under LGPL restrictions,
at http://jade.tilab.com/
----------------------------------------
Aug 13, 2014 1:08:21 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://50.116.61.17:1099
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
Aug 13, 2014 1:08:21 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
.
Aug 13, 2014 1:12:36 PM jade.core.AgentContainerImpl
startBootstrapAgents
SEVERE: Cannot create agent ping1: Remote object unreachable - Caused
by: ICPException delivering command to address
jicp://10.0.0.12:1099. - Caused by: Error creating connection. -
Caused by: Connection timed out
.
Aug 13, 2014 1:12:36 PM jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Container-3#50.116.61.17 is ready.
--------------------------------------------
.

Blank Firefox Window Issue in Selenium PHPUnit Test in Linux Mint

I was trying to test out a page of mine using Selenium and phpunit. I had coded it properly and tried it out on a Ubuntu 14.04 machine. It tested out properly.
However I do not remember the version of selenium server and firefox used.
Now after some issues, I had removed Ubuntu and intalled Mint on my system.
While testing the page, I get a lot of error messages and a blank firefox screen.
Current version of firefox is 30 and Selenium 2.4.2
Tried with firefox versions 25,26,27,30.
I have posted the codes below.
Any help will be appreciated.
Output of Selenium starting
java -jar selenium-server-standalone-2.42.2.jar25 Jun, 2014 3:36:17 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
15:36:17.264 INFO - Java: Sun Microsystems Inc. 20.45-b01
15:36:17.264 INFO - OS: Linux 3.13.0-24-generic amd64
15:36:17.280 INFO - v2.42.2, with Core v2.42.2. Built from revision 6a6995d
15:36:17.347 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
15:36:17.398 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:36:17.399 INFO - Version Jetty/5.1.x
15:36:17.400 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:36:17.401 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:36:17.401 INFO - Started HttpContext[/,/]
15:36:17.419 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#a39ab89
15:36:17.419 INFO - Started HttpContext[/wd,/wd]
15:36:17.422 INFO - Started SocketListener on 0.0.0.0:4444
15:36:17.422 INFO - Started org.openqa.jetty.jetty.Server#5abb7465
Output of Running a PHPUnit Test
phpunit testBooking.php
PHPUnit 3.7.28 by Sebastian Bergmann.
E
Time: 5.24 seconds, Memory: 3.00Mb
There was 1 error:
1) TestBookingBlockDate::testBlock
RuntimeException: POST /session/url
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: 'Sworoop', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version: '1.6.0_45'
Driver info: driver.version: unknown
/var/www/Folder/UnitTests/TurningStone/testBooking.php:13
/var/www/Folder/UnitTests/TurningStone/testBooking.php:13
FAILURES!
Tests: 1, Assertions: 1, Errors: 1.
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'DELETE /session
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'
System info: host: 'Sworoop', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version: '1.6.0_45'
Driver info: driver.version: unknown' in /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Driver.php:127
Stack trace:
#0 /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Session.php(137): PHPUnit_Extensions_Selenium2TestCase_Driver->curl('DELETE', Object(PHPUnit_Extensions_Selenium2TestCase_URL))
#1 /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Session.php(117): PHPUnit_Extensions_Selenium2TestCase_Session->stop()
#2 [internal function]: PHPUnit_Extensions_Selenium2TestCase_Session->__destruct()
#3 {main}
thrown in /usr/share/php/PHPUnit/Extensions/Selenium2TestCase/Driver.php on line 127
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
During this I get a blank firefox window which I have to manually close.
Solved it after reinstalling PHPUnit using composer instead of apt.
Thanks everyone :)

Resources