Need Info : Running docker in cloud with Selenium Grid - which is best service ?

951 views
Skip to first unread message

Vikram

unread,
Mar 3, 2016, 5:45:25 AM3/3/16
to Selenium Users
Hi All,

Is there any cost effective way of running Selenium grid + Docker in cloud ? Which is best service for this ?

Main purpose is any developer should be able to run automation suite on her/his branch

Thanks in advance.

Regards,
Vikram

Jeff H.

unread,
Mar 3, 2016, 12:37:27 PM3/3/16
to Selenium Users
I've found it very easy to run Selenium Grid via an EC2 instance in Amazon's AWS.  I use docker-compose to manage the containers, which really simplifies things.  There is an existing Selenium Docker project:


...so you don't have to create your own images.

This blog post will give you an idea of what's involved (you can ignore the part about building your own images if you use the selenium-docker images):

Vikram

unread,
Mar 7, 2016, 4:16:08 AM3/7/16
to Selenium Users
Hi Jeff,

thanks a ton for this awesome info.

I will try it out and update back on this thread by this week.

Regards,
Vikram

Vikram

unread,
Mar 11, 2016, 8:50:45 AM3/11/16
to Selenium Users
Hi Jeff,

Here is some update with blocking issue


Earlier I had docker setup on MAC mini and everything works perfectly.

Now I'm trying to replicate same setup on Linux VM ( Azure cloud )  + Docker ;  but getting below error and all the test cases are failing.

java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.


I have installed xvbf , chrome browser and chrome driver successfully on Linux VM
. Please let me know if you had encountered this issue earlier

Thanks & Regards,
Vikram



On Thursday, March 3, 2016 at 6:37:27 PM UTC+1, Jeff H. wrote:

Jeff H.

unread,
Mar 11, 2016, 12:25:01 PM3/11/16
to Selenium Users
Vikram, I have not run into that particular error before, and if you're using images from the docker-selenium project, it should not be an issue, since xvfb is built in; see for example:


I would suggest verifying that the Selenium Grid hub is definitely up-and-running as expected, using a URL like this:

http://<hostname>:4444/grid/console

If you see the Grid console at the URL, along with whatever browser nodes you chose to start, then you should be in business.  If you don't see the Grid console at that URL, then something has happened with the hub startup, and I'd suggest looking at the Selenium logs at that point to try and determine the source of the problem.

Vikram

unread,
Mar 16, 2016, 12:58:08 PM3/16/16
to Selenium Users
Hi Jeff,

Thanks for reply.

I could get the issue resolved at last , details here https://github.com/serenity-bdd/serenity-core/issues/353

Here is git repo if somebody wants to try it out with Docker setup

https://github.com/vikramvi/junit-webtests-parallel-grid-docker-jenkins-debug/tree/master/junit-webtests


Now the next challenge is to integrate this whole setup with Jenkins , so that anyone within company network can run in cloud VM.

I'll update once I get it working on Azure Linux VM

Regards,
Vikram

vina...@gmail.com

unread,
May 29, 2017, 3:30:01 AM5/29/17
to Selenium Users
Hi All,

I need help in following. I just started workign on DevOps tools and cloud. Can you someone please guide me with the below points. Much appreciate your help

This is what I have till now,
1. I have installed Jenkins in azure VM and created a sample job which uses simple github project 
2. Able to run the github project from Jenkins with the github project having configured testNG suite, POM.xml has dependency added with seleniumHQ and webdriver

Need help for below
1. I have installed selenium grid plugin in the Jenkins. Have created a sample node. Question - how to tun tests on the node created ?
2. Do I need to create seperate VM in azure and install selenium Hq seperately there?
3. If yes to the 2nd question, How to direct the first instance of Jenkins to talk to selenium installed in seperate VM ?
4. Is there any sample scala project you can guide me into to execute selenium tests?

Thanks in advance,
Vinay 
Reply all
Reply to author
Forward
0 new messages