Question

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

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 .


T E S T S

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 x86_64) (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: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.4.0-78-generic’, java.version: ‘1.8.0_131’ Driver info: org.openqa.selenium.chrome.ChromeDriver 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(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:658) at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:882) at datum.UtilsMethods.browserInvoke(UtilsMethods.java:99) at datum.LoginTest.invokeBrowser(LoginTest.java:20)

Results :

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

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

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [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] [ERROR] Please refer to /home/sample-selenium-datum/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [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] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

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

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.