You can execute test cases on remote environment using Selenium supported Browser Capabilities.
For more information about executing test cases using browser capabilities, please refer to the section Execution using Browser's Capabilities
Offline Execution on Remote/Distributed Environment
You can execute the test cases using offline package after configuring settings accordingly. This gives you provision to trigger suite execution using any machine in the network. You do not need to move the offline package to different machines to execute it. You can do it in following two ways;
- Normal Remote Execution
- Remote Execution through Selenium Grid
Normal Remote Execution
This option can be used when you are aware of the remote machine details where you wish to execute your test cases. Please note that here you choose to execute Offline Package on a remote machine with specific details.
Qualitia uses the selenium-standalone-server-jar for test case executions on the target remote machine.
To run selenium-stand- alone jar:
...
If the execution browser is Iexpore and selenium sever standalone version is 2.xx.x, execute following command: java -jar selenium-server-standalone-2.45.0.jar - Dwebdriver.ie.driver="D:\Data\Testing\Apps\IEDriverServer.exe".
Expand | ||
---|---|---|
| ||
If the execution browser is Iexpore and selenium sever standalone version is 3.xx.x, execute following command: java -Dwebdriver.ie.driver="D:\Data\Testing\Apps\IEDriverServer.exe" -jar selenium-server-standalone-3.0.1.jar
Expand | ||
---|---|---|
| ||
Configuration Settings
Once you download Selenium-stand-alone jar and browser drivers, you need you change some settings in the qualitia.properties file in order to run Normal Remote Execution.
To configure settings as for Normal Remote Execution:
...
Selenium allows you setting desired browser specific properties to be used when executing test cases. These properties can be set for offline execution as well. You can provide these browser specific details through browser-capability files. For each supported browser (Firefox, IE, Google Chrome, and Safari) there is a separate property file present in the Config folder of Qualitia's offline package. Following is the list of files;
- firefoxdc.properties
- googlechromedc.properties
- iexploredc.properties
- safaridc.properties
Each property file above is a set of all the browser specific properties that Selenium allows you change. If you do not change any property, Selenium uses its default values.
Changing Browser Capabilities
Selenium uses its own settings for each key that has been commented in the file, except unexpectedAlertBehaviour. Changing properties here overrides the values provided in qualitia.properties/sauce.properties, or selenium's default values. When executing test cases using offline package, you can change some property values providing command line arguments accordingly. But all capability keys do not accept values from command line, hence it is recommended providing values through property files.
To change browser capabilities:
- Open the browserdc.properties file from the config folder of offline packageQualitia Bot.
- Set Locate the ExecutionEnvironment value as remotevalue you want to change in the file.
- Set the RemoteURL value to a valid remote URL that is IP and port of remote machine.
For example: RemoteURL=http://192.168.25.123:4445
Offline Remote Execution and Reports
You can execute offline package using the traditional method after the configuration settings are done.
For more information about offline package execution, please refer to the Offline Package - Execution section.
It uses browsers available on local machine for test case executions. For example, if you have selected "Firefox" as an execution browser and the local machine has Firefox version 42, Qualitia continues execution using Firefox version 42. Execution Reports are displayed on the local machine after executing the test cases.
Execution using Browser Capabilities
You can execute test cases on remote environment using selenium supported Browser Capabilities.
For more information about executing test cases using browser capabilities, please refer to the Execution using Browser's Capabilities section.
Mobile Test Case Executions
In order to execute mobile test cases on the remote machine, make sure that Appium server is up and running on the designated remote machine.
For more information about installing Appium Server, refer to the Qualitia Online Help.
Remote Execution through Selenium Grid
You can choose this option when you have distributed test environments where you want network to select a remote machine based on the availability.
Key Points to Know Before You Start
Expand | ||
---|---|---|
| ||
The Hub is the main command center for managing which machines your test will run on. This is where you can see list of all the available nodes currently running in your grid environment (Remote Execution Environment). |
Expand | ||
---|---|---|
| ||
A Node is a machine that you register with your Hub. By registering with Hub, the Hub now knows about the Node and any configuration information you used when you registered the node. |
In order to perform remote execution through selenium grid, you need to configure Hub and Node in the network.
Creating Hub in the Network
A Hub can be created in the network following the steps mentioned below.
- Decide a machine in the network to register as hub (with IP, for example, 192.168.25.6).
- Download the Selenium-server-standalone jar file on Hub machine.
- Open Command Prompt and navigate to the location where Selenium-server-standalone-jar is saved.
- Execute command "java -jar selenium-server-standalone-2.xx.0.jar-role hub -port 4445".
Create Node and Register to Hub
Once hub is created in the network, you can select multiple machines to act as its nodes.
Registering nodes include following steps.
- Download the Selenium-server-standalone jar file on Hub machine.
- Launch the command prompt and navigate to the location where Selenium-server-standalone jar file is saved.
- Execute command "java -jar selenium-server-standalone-2.xx.x.jar -role node–hub http://hubIP:4445/grid/register".
Configuration Settings
Before executing test cases in remote execution in Selenium grid, you need to configure settings accordingly.
Here are some important points to keep in mind when configuring settings for remote execution in selenium grid.
- Selenium server jar version used in Qualitia offline package and downloaded at remote machines including Hub and Nodes should be same all over.
- Java needs to be installed and configured in computer's environment path.
- Port number used for hub is changeable and default port number is 4444.
- As hub selects node for execution at its own at run time, you cannot provide details for specific OS / Platform.
- To know more about how to setup Selenium grid hub and node it is recommend using the selenium grid links given below
To configure settings for remote execution in selenium grid:
- Open the qualitia.properties file from the config folder of offline package.
- Set the ExecutionEnvironment value as remote to inform qualitia-offline.jar that offline package has to be executed on a remote machine.
- Set the RemoteURL value to a valid remote URL that is IP and port of remote machine. For example: RemoteURL=http://192.168.25.123:4445
- Set the GridPlatform value to valid platform where you want to execute test cases.
For example: Set the GridPlatform=Win10
Offline Remote Execution and Reports
You can execute offline package using the traditional method after the configuration settings are done.
For more information about executing Offline package, please refer to the Offline Package - Execution section.
It uses browsers available on local machine for test case executions. For example, if you have selected "Firefox" as an execution browser and the local machine has Firefox version 42, Qualitia continues execution using Firefox version 42. Execution Reports are displayed on the local machine after executing the test cases.
Execution using Browser Capabilities
You can execute test cases on remote environment using selenium supported Browser Capabilities.
For more information about executing test cases using browser capabilities, see section 3.4.5, "Execution using Browser's Capabilities."
Mobile Test Case Execution on Nodes
In order to execute mobile test cases using selenium grid, make sure that Appium server is up and running on the designated node.
...
- Remove the # sign located prior to the capability.
- Enter the value you want to set for the capability.
For example; if you want to change the version of the browser to be used for test execution, remove the # sign located prior to the version and enter the version number against it.
Qualitia gives you provision to set these values for Selenium. Selenium has its own control on what value to use and how to reflect them in Execution Browser. For more information about Selenium Capabilities, refer following links: