Running tests from a remote browser
The Storefront Test Automation Engine supports
execution of test cases where the local workstation controls a web
browser on a remote workstation. Running tests this way relieves the
tester of having to install different brands and versions of browsers
on their local workstation. Multitasking on the local workstation
does not interfere with the browser testing as the browser that is
being tested is on the remote workstation.
Before you begin
- Ensure that the browser versions you want to test are installed on the remote workstation.
- Install Java JRE (or JDK) version 1.7 or higher, and add it to the PATH environment variable. You must be able to call the java.exe from any directory.
- Create a directory to put the Selenium test assets. For example, C:\remoteselenium
- Copy the Selenium stand-alone JAR file in that directory.
If you plan on testing Internet Explorer or Google Chrome for example, you must also download the drivers for them.
- Create an empty batch file in the directory. For example: startSelenium.bat.
- Open the batch file and add the following code:
java -jar selenium-server-standalone-2.XX.Y.jar -timeout=20 -browserTimeout=60
- Replace XX and Y with the actual version of the Selenium stand-alone JAR file that you are using.
- If you are testing Internet Explorer, add the following parameter
immediately after '
java
', to indicate where the driver server is located:-Dwebdriver.ie.driver=IEDriverServer.exe
- If you are testing Chrome, add the following parameter immediately
after '
java
', to indicate where the driver server is located:-webbdriver.chrome.driver=chromedriver.exe
- Save and close the batch file.
Note: For more information about Selenium parameters, see The RemoteWebDriver Server.
Procedure
-
On the remote workstation, from the command prompt run the batch file that you created in the
setup step.
Selenium runs in the command prompt. This is where it provides log information as it receives requests to perform actions on the browser.
- On the local workstation:
- Browse to and open the config.properties file at the root of the Aurora-Tests-Wte project.
- Search for the following property in the file:
REMOTE_BROWSER_HOSTNAME
. If it does not exist, add it. - Set
REMOTE_BROWSER_HOSTNAME
to the host name of the remote workstation. - Run your tests.
Note: To disable remote browser execution, comment out theREMOTE_BROWSER_HOSTNAME
property in the config.properties file.
Results
Note: If
the connection is refused when you try to connect to the remote workstation,
the firewall on the remote workstation could be blocking the connection.
On the remote workstation, allow TCP/UDP access
to port 4444 (the default port) through its firewall.