Forge Home

selenium

Manages Selenium Server 2 - Standalone and Grid

143,336 downloads

131,956 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.1.0 (latest)
  • 1.0.0
  • 0.3.0
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
  • 0.0.1
released Nov 22nd 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'jhoblitt-selenium', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jhoblitt-selenium
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jhoblitt-selenium --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

jhoblitt/selenium — version 0.1.1 Nov 22nd 2013

Puppet selenium Module

Build Status

Table of Contents

  1. Overview
  2. Description
  3. Usage
  4. Why Another Module?
  5. Limitations
  6. Versioning
  7. Support
  8. See Also

Overview

Manages Selenium Server 2 - Standalone and Grid

Description

This is a puppet module for installation and configuration of the Selenium Server 2 browser automation package. Support is provided for configuring Selenium Server in standalone mode along with the grid modes of hub and node.

The design intent of this module is to only manage Selenium server and not any of the other packages that might be required to required to create a selenium server role.

Usage

Simple

Stand alone server setup with display :99 (default is :0).

class { 'selenium::server': display => ':99' }

Grid in a box setup with the Selenium node talking to the hub via 127.0.0.1.

class { 'selenium::hub': }
class { 'selenium::node': }

Files

Unless class selenium has $install_root changed from the default, these files paths will be used. Note that the log files and init scripts are only created for the relevant configured service.

The log files will have the mode 0644 so that they can be inspected by users other than the selenium role account.

/opt/selenium
|-- jars
|   `-- selenium-server-standalone-2.35.0.jar
`-- log
    |-- hub_stderr.log
    |-- hub_stdout.log
    |-- node_stderr.log
    |-- node_stdout.log
    |-- server_stderr.log
    `-- server_stdout.log
/etc/init.d/seleniumhub
/etc/init.d/seleniumnode
/etc/init.d/seleniumserver

selenium

This class controls common configuration values used by the selenium::{server,hub,node} classes. It is automatically included in the manifest by those classes and it need not be explicitly declared except to override the default values.

# defaults
class { 'selenium':
  user         => 'selenium',
  group        => 'selenium',
  install_root => '/opt/selenium',
  java         => 'java',
  version      => '2.35.0',
  url          => undef,
}
  • user

    String defaults to: selenium

    The name/uid of the system role account to execute the server process under and will have ownership of files.

  • group

    String defaults to: selenium

    The group/gid of the system role account and group ownership of files.

  • install_root

    String defaults to: /opt/selenium

    The dirname under which Selenium Server files (including logs) will be created.

  • java

    String defaults to: java

    The path of the java interpreter to use.

  • version

    String defaults to: 2.35.0 (the latest release as of 2013-10-08)

    The version of Selenium Server to download. Used to form the URL used to fetch the jar file.

  • url

    String defaults to: undef

    If defined, url will be used to download the Selenium Server jar file. However, the version parameter just match the version of the downloaded file as this information is needed when starting up the server (this may change to be be automatically parsed from the url in a later release).

selenium::server

# defaults
class { 'selenium::server':
  display => ':0',
  options => '-Dwebdriver.enable.native.events=1',
}
  • display

    String defaults to: :0

    The name of the X display to render too. This is set as an environment variable passed to Selenium Server

  • options

    String defaults to: -Dwebdriver.enable.native.events=1

    Options passed to Selenium Server at startup.

selenium::hub

Note that by default selenium::server and selenium::hub will try to listen on the same TCP port (4444) and only one of them will be able to function.

# defaults
class { 'selenium::hub':
  options => '-role hub',
}
  • options`

    String defaults to: -role hub

    Options passed to Selenium Server Hub at startup.

selenium::node

# defaults
class { 'selenium::node':
  display => ':0',
  options => '-Dwebdriver.enable.native.events=1 -role node',
  hub     => 'http://localhost:4444/grid/register',
}
  • display

    String defaults to: :0

    The name of the X display to render too. This is set as an environment variable passed to Selenium Server

  • options

    String defaults to: -Dwebdriver.enable.native.events=1 -role node

    Options passed to Selenium Server Node at startup.

  • hub

    String defaults to: http://localhost:4444/grid/register

    The URL of the Selenium Server Hub to connect to.

Why Another Module?

At the time work on this module was started, there were no other Selenium Server modules published on the Puppet Forge. A number of existing modules were identified on github but none of them fit the authors needs of:

  • Allowing the external setup of things like Xvfb, java, etc.
  • Supporting a mixed environment of Scientific, Centos, and RedHat Linux (basically $::osfamily == 'RedHat'
  • Enough rspec-puppet coverage to prevent regressions

The later is the most important issue. Attempting to add additional $::operatingsystem/$::osfamily support to a puppet module without rspec-puppet tests is a process fraught with peril.

The modules that were identified were:

Limitations

At present, only support for $::osfamily == 'RedHat' has been implemented. Adding other Linux distributions will required the addition of platform specific init scripts.

Tested Platforms

  • el6.x

Versioning

This module is versioned according to the Semantic Versioning 2.0.0 specification.

Support

Please log tickets and issues at github

See Also