Windows

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

Configure the remote workstation:
  1. Ensure that the browser versions you want to test are installed on the remote workstation.
  2. 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.
  3. Create a directory to put the Selenium test assets. For example, C:\remoteselenium
  4. 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.

  5. Create an empty batch file in the directory. For example: startSelenium.bat.
  6. 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
  7. Save and close the batch file.
Note: For more information about Selenium parameters, see The RemoteWebDriver Server.

Procedure

  1. 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.
  2. On the local workstation:
    1. Browse to and open the config.properties file at the root of the Aurora-Tests-Wte project.
    2. Search for the following property in the file: REMOTE_BROWSER_HOSTNAME. If it does not exist, add it.
    3. Set REMOTE_BROWSER_HOSTNAME to the host name of the remote workstation.
    4. Run your tests.
    Note: To disable remote browser execution, comment out the REMOTE_BROWSER_HOSTNAME property in the config.properties file.

Results

The remote workstation starts the browser that is specified in the config.properties file and runs the tests.
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.