This repository contains the source to create Windows Installer packages for a Selenium Grid.
Setting up a Selenium Grid on Windows can be time consuming, error prone and complex. For a Selenium hub, you'll often need to do something like this:
- Install a supported version of Java
- Download Selenium
- Download a Windows Service Wrapper
- Configure the Windows Service Wrapper
- Create a dedicated local user account
- Give the dedicated local user account permissions to the file system
- Create the Windows Service
- Run some commands to ensure the port used by the Selenium Hub isn't going to be assigned by Windows to something else.
- Configure the Windows Firewall to allow Selenium nodes and clients to connect to the hub
- Start the Windows Service
Then for each Windows host that act as an node, you'll need to do the same thing, except since the nodes typically run different operating systems (Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016):
- Install the Browsers (Chrome, Opera, Firefox, Internet Explorer 11)
- Install a supported version of Java
- Download Selenium
- Download a Windows Service Wrapper
- Configure the Windows Service Wrapper
- Create a dedicated local user account
- Give the dedicated local user account permissions to the file system
- Create the Windows Service
- Run some commands to ensure the port used by the Selenium Grid isn't going to be assigned by Windows to something else.
- Configure the Windows Firewall to allow the Selenium Hub to connect to the Selenium nodes.
- Start the Windows Service
The goal of these installers is to do most of this where licensing permits binaries to be redistrubuted.
In order to build the codebase you'll need the following
- nuget
- Visual Studio Community editio n or higher
Before you can build the packages, you'll need to restore packages. Typically this is only done once, but you may need to do it whenever the packages folder was deleted.
nuget restore SeInstaller.sln
In order to build the release package, you can use msbuild
.
msbuild /t:Build /p:Configuration=Release /p:Platform=x86 SeInstaller.sln
When making changes to the installers, the following tests needs to pass:
- The display name showed in the Control Panel is "Phaka Selenium Hub"
- The display name of the Windows Service is "Phaka Selenium Hub"
- A user "Phaka Selenium Hub" was created.
- The files were deployed to
%ProgramFiles(x86)%\Selenium\Hub
- The configuration file,
%ProgramFiles(x86)%\Selenium\Hub\selenium-hub.cfg
has the correct values. - Uninstalling the package cleanly removes all files
- The package is upgradable from previous versions
- The display name showed in the Control Panel is "Phaka Selenium Node"
- The display name of the Windows Service is "Phaka Selenium Node"
- The files were deployed to
%ProgramFiles(x86)%\Selenium\Node
- The configuration file,
%ProgramFiles(x86)%\Selenium\Node\selenium-node.cfg
has the correct values. - Uninstalling the package cleanly removes all files
- The package is upgradable from previous versions