Creating Jenkins Nodes dedicated for running Selenium Automation Scripts

If you are having problems running your Selenium Test-Suite on a remote node from Jenkins, you probably need this blog the most! After encountering a lot of wierd jenkins errors like :-

Headless Exception Error:-

I got this error when I was trying to execute my Selenium Scripts on a remote node using a SSH connection.

HeadlessExceptionforSSH

2.Another error saying ‘Channel stopped’ on Mac when node was communicated using SSH:-

JenkinsasaServiceError

3.Error when Jenkins node used as a service on Win:-

COM method IWebBrowser2::Navigate(2) failed

I observed this error in my stacktrace while trying to execute my Selenium script on Internet Explorer browser.

A lot of searching & googling, I finally come up with my solution!! Eureka!… hehe…

Setting up a Jenkins node dedicated for Automation Executions:-

1.Go to Jenkins > Manage Jenkins > Manage Node > New node

2.Enter node name , select dumb slave

3.Give remote working directory for your node.

4.Select ‘Launch Slave Agents via Java Web Start’ in Launch Method.This is very important for machines which run Selenium Automation Scripts.

5.I have 2 dedicated nodes i.e 1 Win Machine & 1 Mac Machine for running my automation test-suite. This method is the way to go for hassle-free execution.

Note:I previously tried running these scripts using SSH & as a windows service(for Win OS only) on my remote nodes , and the Automation Scripts would fail as Selenium webdrivers do not support automation processes which run as a Windows Service or a headless execution(in case of SSH).

Mapping a node for a particular job(for beginners):-

Enter the node name in the “Restrict where the project can be run” field in your Jenkins job and you are good to go!

Regards,

VJ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s