Configure a Selenium Hub
Introduction
This how-to explains how to configure a Selenium hub in ATS. There are four Selenium hub possibilities in ATS. How to configure all the four Selenium hubs and where you can retrieve the necessary information is explained.
This how-to teaches you how to do the following:
- Configure a BrowserStack Selenium hub
- Configure a Sauce Labs Selenium hub
- Configure a TestingBot Selenium hub
- Configure a Custom Selenium hub
Prerequisites
Before starting with this how-to, make sure you have the following prerequisites in place:
- Have the appropriate role to gain access to the test settings in ATS.
- Have access to a Selenium provider account or internal Selenium server.
The Test Settings
To get to the test settings follow these steps:
- Go to ATS and log in.
- Open the app where you want to add the Selenium hubs.
- Once inside your app click the profile menu and click Show Test Settings.
The Selenium hubs section contains all the configured Selenium hubs for this app. Here you add a new Selenium hub by clicking New Selenium Hub.
The Select Provider dialog box opens. Here you select one of the four configurable Selenium hub options. Each of the options is explained in the sections below.
Custom Capabilities
Each Selenium provider allows the user to set certain custom capabilities. The custom capabilities are used to set specific conditions. ATS uses these custom capabilities when you execute a test case or test suite. For example, Selecting ‘Chrome’ as your browser is a custom capability. ATS will then execute the test case or test suite using Chrome. The different Selenium providers allow for different custom capabilities. How to select custom capabilities is explained for each Selenium hub in the corresponding chapter.
Some examples of custom capabilities are:
- Timezone
- Resolution
- Builds
- Names
Custom capabilities are explained separately for each Selenium option in the next chapters.
Configure BrowserStack
Basic Configuration
To configure BrowserStack as a Selenium hub follow these steps:
-
Go to the Select Provider dialog box and select BrowserStack.
-
The New Selenium Hub dialog box opens. Here you enter the necessary information for ATS to connect to your BrowserStack account.
-
In the Name field you enter a name for your Selenium hub. This is only meant to help you identify the Selenium hub when selecting the Selenium hub for a test run.
-
In the Username field you enter the username of your BrowserStack account.
-
In the Access Key field you enter the access key of your BrowserStack account.
To find the username and access key follow these steps:
-
Go to BrowserStack and log in with the account you want to connect to ATS.
-
Click Automate in the navigation bar.
-
There is a collapsible menu on the left side of the screen. When you unfold it, it displays the Username and the Access Key when you unfold it. It also has a Copy button.
Leave the New Selenium Hub dialog box open for the next chapter.
Custom Capabilities
To set a custom capability for BrowserStack follow these steps:
-
Go to the New Selenium Hub dialog box.
-
Click New in the Custom Capabilities section.
-
The New Capability dialog box opens.
-
To enter a custom capability you must know which capabilities you can use. Go to the capabilities section on the BrowserStack website. Choose a capability, for example, name.
-
Now enter the capability in the Key field and the value you want in the Value field.
The datatype is always String unless you must enter true or false then the datatype must be set to Boolean. -
Click Save.
-
Add another custom capability or click Save when on the New Selenium Hub dialog to store your Selenium hub set-up.
You now configured your BrowserStack Selenium hub. You can create as many variations as you like. When multiple people use the same BrowserStack account, you can use the name capability to keep the test runs separated.
Configure Sauce Labs
Basic Configuration
To configure Sauce Labs as a Selenium hub follow these steps:
-
Go to the Select Provider dialog box and select SauceLabs.
-
The New Selenium Hub dialog box opens. Here you enter the necessary information for ATS to connect to your Sauce Labs account.
-
In the Name field you enter a name for your Selenium hub. This is only meant to help you identify the Selenium hub when selecting the Selenium hub for a test run.
-
In the Username field you enter the username of your Sauce Labs account.
-
In the Access Key field you enter the access key of your Sauce Labs account.
To find the username and access key follow these steps:
-
Go to Sauce Labs and log in with the account you want to connect to ATS.
-
Open the profile menu in the upper right corner of your screen and click My Account in the drop-down menu.
-
You find your Sauce Labs username and access key on this page.
Leave the New Selenium Hub dialog box open for the next chapter.
Custom Capabilities
To set a custom capability for Sauce Labs follow these steps:
-
Go to the New Selenium Hub dialog box.
-
Click New in the Custom Capabilities section.
-
The New Capability dialog box opens.
-
To enter a custom capability you must know which capabilities you can use. Go to the Test Configuration section on the Sauce Labs documentation website. Choose a capability, for example, name.
-
Now enter the key in the Key field and the value you want in the Value field.
The datatype is always String unless you must enter true or false then the datatype must be set to Boolean. -
Click Save.
-
Add another custom capability or click Save when on the New Selenium Hub dialog to store your Selenium hub set-up.
You now configured your Sauce Labs Selenium hub. You can create as many variations as you like. When multiple people use the same Sauce Labs account, you can use the name capability to keep the test runs separated.
Configure TestingBot
Basic Configuration
To configure TestingBot as a Selenium hub follow these steps:
-
Go to the Select Provider dialog box and select TestingBot.
-
The New Selenium Hub dialog box opens. Here you enter the necessary information for ATS to connect to your TestingBot account.
-
In the Name field you enter a name for your Selenium hub. This is only meant to help you identify the Selenium hub when selecting the Selenium hub for a test run.
-
In the Client Key field you enter the Client key of your TestingBot account.
-
In the Client Secret field you enter the Client secret of your testingbot account.
To find the username and access key follow these steps:
-
Go to TestingBot and log in with the account you want to connect to ATS.
-
Click My Account in the upper right corner of the screen.
-
You find your TestingBot key and secret on this page.
Leave the New Selenium Hub dialog box open for the next chapter.
Custom Capabilities
To set a custom capability for TestingBot follow these steps:
-
Go to the New Selenium Hub dialog box.
-
Click New in the Custom Capabilities section.
-
The New Capability dialog box opens.
-
To enter a custom capability you must know which capabilities you can use. Go to the Test Configuration section on the TestingBot website. Choose a capability, for example, name.
-
Now enter the name value in the Key field and the value you want in the Value field.
The datatype is always String unless you must enter true or false then the datatype must be set to Boolean. -
Click Save.
-
Add another custom capability or click Save when on the New Selenium Hub dialog to store your Selenium hub set-up.
You now configured your TestingBot Selenium hub. You can create as many variations as you like. When multiple people use the same TestingBot account, you can use the name capability to keep the test runs separated.
Configure a Custom Selenium Hub
Basic Configuration
To configure a custom Selenium hub follow these steps:
-
Go to the Select Provider dialog box and select Custom.
-
The New Selenium Hub dialog box opens. Here you enter the necessary information for ATS to connect to your local Selenium server.
-
In the Name field you enter a name for your Selenium hub. This is only meant to help you identify the Selenium hub when selecting the Selenium hub for a test run.
-
In the Custom URL field you enter the access URL of your server.
For more information on local Selenium set-up go to Customer Hosted Selenium.
Leave the New Selenium Hub dialog box open for the next section.
Custom Capabilities
Setting a custom capability in your custom Selenium is possible but must be configured on the server itself.
You now configured your custom Selenium hub. You can create as many variations as you like.
Next Up
You now learned how to configure the different Selenium hubs. The next how-to is How to Create a Test Case. You find an overview of all the how-tos and the structure on the ATS 2 How-tos page. We advise you to follow the predefined structure.