Selenium Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID selenium Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
2.4.1
Apr 12, 2014
1.478
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Richard Lavoie (id: darkrift)
Usage Installations 2013-Apr 989
2013-May 1041
2013-Jun 1019
2013-Jul 1084
2013-Aug 1054
2013-Sep 1108
2013-Oct 1136
2013-Nov 1112
2013-Dec 1118
2014-Jan 1181
2014-Feb 1201
2014-Mar 1213

This plugin turns your Jenkins cluster into a Selenium2 Grid cluster, so that you can utilize your heterogeneous Jenkins clusters to carry out Selenium tests. It now has configurations to really specify the capabilities of each node so it won't fail your tests when a node is started with incompatible capabilities.

Selenium Grid deployment on Jenkins cluster

This plugin sets up Selenium Grid in the following way

  • On master, Selenium Grid Hub is started on port 4444. This is where all your tests should connect to.
  • For each slave, necessary binaries are copied and Selenium RCs are started.
  • RCs and the Selenium Grid Hub are hooked up together automatically.

Grid can also accept additional nodes launched outside Jenkins.

Connecting to Selenium Grid

When you run selenium tests in stand-alone Selenium, you specify the type of the browser in the constructor.

WebDriver driver = new RemoteWebDriver(new URL("http://jenkins.mydomain:4444/wd/hub"), capability);

In addition to standard platform matching capability offered out-of-the-box by Selenium Grid, Jenkins allows you to specify "jenkins.label" as a capability, whose value is an expression of label names to narrow down where to run the tests. See the following example:

DesiredCapabilities capability = DesiredCapabilities.firefox();
// say you use the redhat5 label to indicate RHEL5 and the amd64 label to specify the architecture
capability.setCapability("jenkins.label","redhat5 && amd64");
// Say you want a specific node to thread your request, just specify the node name (it must be running a selenium configuration though)
capability.setCapability("jenkins.nodeName","(master)");

These capabilities are matched by a custom capability matcher.

Connecting from Selenium 1 client

Selenium 1 clients can connect to this via the following syntax:

new DefaultSelenium("jenkins.mydomain", 4444, "*firefox", 'http://amazon.com');

Due to the underlying code change in Selenium, this plugin no longer allows Selenium1 clients to do label-based capability matching like the previous versions. If this is important, please use the selenium plugin 1.5, which is the last version that shipped with Selenium Grid 1, which supported the "LABEL[&LABEL&...]:BROWSER" syntax in the browser field to select nodes via labels.

browser string meaning
*iexplore Pick an available slave randomly, and run IE there. Since there's no guarantee that the randomly selected slave can actually run IE, this way of specifying a browser is unreliable unless all your slaves are Windows.
windows:*iexplore Pick an available slave that has the 'windows' label randomly, and run IE. This gives you assurance that IE will be executable
windows&32bit:*firefox Run Firefox on a node that has both 'windows' and '32bit' labels

The "BROWSER" portion is passed as-is to the selenium RC. For valid values, see this and this.

Changelog

Version 2.4.1 (April 12th, 2012)

  • Added missing configuration for system properties (webdriver.ie.driver and webdriver.chrome.driver for example) for the direct JSON configuration to be useful. 

Version 2.4 (April 11th, 2012)

  • Added a way to specify the hub host name for slaves to connect to.
  • Added a new JSON configuration type where you can directly specify a configuration directly in JSON.
  • Now bundling the IE server so it deploys it on windows machine directly for the RC configuration and WD configuration types.
  • Allows the hub to be restarted if needs be. Happens sometimes that the hub process goes nuts and needs a restart without having to restart jenkins.
  • Improved rendering of the selenium main page where it groups the available sessions per host instead of listing them all straight. Was not really nice when you have more than 3-4 selenium nodes connected to the hub.
  • When a node configuration is removed, it is now stopped on all the slaves and removed from the running configurations.
  • Various other small fixes and improvements in the code

Version 2.3 (Never released)

  • Had a problem with the release process and the plugin never got to the jenkins server.

Version 2.4 (April 11th, 2012)

  • Added a way to specify the hub host name for slaves to connect to.
  • Added a new JSON configuration type where you can directly specify a configuration directly in JSON.
  • Now bundling the IE server so it deploys it on windows machine directly for the RC configuration and WD configuration types.
  • Allows the hub to be restarted if needs be. Happens sometimes that the hub process goes nuts and needs a restart without having to restart jenkins.
  • Improved rendering of the selenium main page where it groups the available sessions per host instead of listing them all straight. Was not really nice when you have more than 3-4 selenium nodes connected to the hub.
  • When a node configuration is removed, it is now stopped on all the slaves and removed from the running configurations.
  • Various other small fixes and improvements in the code

Version 2.3 (Never released)

  • Had a problem with the release process and the plugin never got to the jenkins server.

Version 2.1 (Sept 4, 2012)

  • Rewrote the whole plugin to add configurations and service management.

Version 2.0 (Dec 26, 2011)

  • Substantially modified to work with Selenium 2.

Version 1.5 (Dec 24, 2011)

  • pull request 4 Added -browserSessionReuse option
  • Improved error diagnostics when the Jenkins URL isn't configured.

Version 1.4 (Mar 4, 2011)

  • Made the log level configurable (issue #5637)
  • Fixed possible selection of wrong Selenium RC.
  • Upgraded to Selenium Grid 1.0.7 (issue #6207)

Version 1.3 (Jan 25, 2010)

  • Make sure hub was started before launching RCs (issue #5370)
  • Supported trustAllSSLCertificates option (issue #5372)

Version 1.2 (Sep 7, 2009)

  • Upgraded to Selenium Grid 1.0.4
  • Upgraded to Selenium Server 1.0.1
  • Allow nodes to be excluded from the Grid
  • Specify additional Remote Control startup options (-browserSideLog, -log, -debug, -firefoxProfileTemplate)

Version 1.0 (Apr 26, 2009)

  • First version

Labels

Edit
plugin-cluster plugin-cluster Delete
selenium selenium Delete
grid grid Delete
plugin plugin Delete
cluster cluster Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment