Is it possible to run selenium test cases on cloud(digital ocean droplet0?

May 19, 2017 66 views

I am using maven to run my selenium test cases .I have taken the whole code to my digital ocean Ubuntu server ,I have installed or configured all necessary plugins like chromedriver,maven..etc . On running the command mvn test I am getting the following error .


Running TestSuite
Configuring TestNG with: TestNG652Configurator
Starting ChromeDriver 2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320) on port 28572
Only local connections are allowed.
May 19, 2017 4:56:16 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
May 19, 2017 4:57:17 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Configuring TestNG with: TestNG652Configurator
Tests run: 5, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 63.761 sec <<< FAILURE! - in TestSuite
invokeBrowser(datum.LoginTest) Time elapsed: 63.281 sec <<< FAILURE!
org.openqa.selenium.NoSuchSessionException: no such session
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-78-generic x8664) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 85 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'devopspipe', ip: '', 'Linux', os.arch: 'amd64', os.version: '4.4.0-78-generic', java.version: '1.8.0
Driver info:
Capabilities [{message=unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-78-generic x86_64), platform=ANY}]
Session ID: 7c4d43849026d2b42c83fa6d39230969
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.openqa.selenium.remote.ErrorHandler.createThrowable(
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(
at datum.UtilsMethods.browserInvoke(
at datum.LoginTest.invokeBrowser(

Results :

Failed tests:
LoginTest.invokeBrowser:20 » NoSuchSession no such session
(Driver info: chr...

Tests run: 5, Failures: 1, Errors: 0, Skipped: 3

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:10 min
[INFO] Finished at: 2017-05-19T04:57:18+00:00
[INFO] Final Memory: 20M/48M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project DataVisualisation: There are test failures.
[ERROR] Please refer to /home/sample-selenium-datum/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

1 Answer
Woet May 19, 2017
Accepted Answer

Anything that works on Linux will work on DigitalOcean. Be sure to install a GUI for Selenium.

Have another answer? Share your knowledge.