Table of Contents

IT:AD:Selenium:HowTo:Install/Preparation

Summary

Installing Selenium for an enterprise environment is not trivial, involving:

  • multiple browsers
  • multiple operating systems
  • secure network communication
  • combinations of frameworks (.NET, Java, and others)

Careful preparation will cut down the risk of expending a lot of time setting the environment up.

Process

PreInstall: Ensure Java is installed

You'll need IT:AD:Java installed first:

You can check that it's correctly installed as follows: * IT:AD:Java:HowTo:Check that Java is correctly installed

Create a Service Account

You'll need a service account on each Hub Server of your Grid, eg: Svc_Selenium, or Svc_UXTests, as well as the Node servers.

Design your Testing Topology

Selenium can be installed either: * as a single instance, or * as a grid of Selenium installs (where you have a front Selenium instance you communicate with who in turn managers n instances of Selenium on other servers of various operating systems).

Bar the most trivial POC scenarios, in an enterprise environment where you'll need to test against various versions of a browsers that can't be installed side by side on the same browser (eg: IE), you'll need a Selenium Grid.

As it's the more complex scenario of the two, the following will concentrate on how to install a Grid.

To install a Grid, you'll need a Server box, and Hub boxes (one for Chrome, one for each version of IE (as it can't be installed side by side on the same machine).

DevBoxHubNode 1Node 2Node 3ChromeFFIElatestIE6IE8Win7Win7Win7XPXP

A Node Selenium server can be installed on the same machine as the Hub Selenium Server – but not recommended (the machine on which the Selenium Hub Server is usually a Server OS, whereas, the Nodes are usually workstation OS's).

But it's also fine in most cases, as browsers are (in 99.99% of cases…) browsers – no matter what OS they are running on.

One Node Selenium server can manage more than one WebDriver.

Build VMs

You'll therefore need VMs built up that are suitable for the topology you've decided on. Ask your SysAdmin.

At the very least – to get started – you'll need a VM on which to install the Hub (and optionally webdrivers, as mentioned above).

Download and Install NSSM

Configuring Windows Service is difficult and opaque enough already, and even more so when trying to run Java based applications (Selenium's servers are Java based application).

Hence why we recommend you install IT:AD:NSSM (Non Sucking (Windows) Service Manager) on all the VMs, as per the instructions: Install

Normally, I would suggest referencing one copy of NSSM on your machine (eg: c:\Apps) but in this case I'll suggest you place a copy of NSSM in the Selenium directory.

Download the software

The primary source packages can be downloaded from: * http://docs.seleniumhq.org/download/

There you'll see a tree of files to download:

What To Download

As a “Microsoft Shop” you'll be most probably be wanting a combination of:

The IE Server is tiny and is going to be one of the 'node's in your Grid. By default – like all nodes – starts on port 5555, but can be changed by starting it with -port=5556

As for testing Chrome. You'll need: *

You'll also need the WebDrivers for each browser.

PreInstall

On the server:

On the Hub you'll be using to test Chrome, you'll need to:

On the Hub you'll be using to test a version of IE, you'll need: