Previous Topic: Use the Load Test OptimizerNext Topic: Assumption of Load Testing


Run a Selenium Integration Test Case

Selenium Integration test steps let you import test scripts for web-based user interfaces from Selenium Builder to DevTest Solutions. The recording of these test scripts requires Selenium Builder, which is only supported in Firefox. After you import the test to DevTest, you can run the test in Mozilla Firefox, Google Chrome, or Internet Explorer 8.0 or later. You can also run the test in either a local or remote browser.

You can run Selenium Integration tests like any other test cases in DevTest. However, running these tests in a browser other than Firefox requires additional prerequisite tasks. For general information about running a test case, see Running Test Cases and Suites.

Run a Selenium Integration Test on Google Chrome (Local)

This topic describes how to run a Selenium Integration test case on Google Chrome on your local computer.

Follow these steps:

  1. Download the Selenium Chrome driver and save it to a local directory.
    1. Go to http://www.seleniumhq.org/download/.
    2. Locate the Chrome driver in the Third Party Browser Drivers NOT DEVELOPED by seleniumhq section and download it.
  2. Add the following properties to the project configuration file you use to run test cases on Chrome.

    Note: Add these properties to project.config before you add them to other project configuration files.

  3. Right-click the selected project configuration file in the Project panel and select Make Active.
  4. Run the test.

Run a Selenium Integration Test on Microsoft Internet Explorer (Local)

This topic describes how to run a Selenium Integration test case on Internet Explorer on your local computer.

Follow these steps:

  1. Download the Selenium 32-bit Windows IE driver and save it to a local directory.
    1. Go to http://www.seleniumhq.org/download/.
    2. Locate the 32-bit Windows IE driver in the Internet Explorer Driver Server section and download it.

    Note: Because of a known issue with 64-bit driver performance, we recommend that you install the 32-bit version, even if you use a 64-bit system.

  2. Add the following properties to the project configuration file that you use to run test cases on Internet Explorer.

    Note: Add these properties to project.config before you add them to other project configuration files.

  3. Right-click the selected project configuration file in the Project panel and select Make Active.
  4. Modify your Internet Explorer security settings.
    1. Open Internet Explorer.
    2. Click Tools, Internet Options.
    3. Click the Security tab.
    4. Verify that the Enable Protected Mode check box set the same (selected or cleared) for the following zones. If this setting is inconsistent, Selenium does not start.
      • Internet
      • Local Intranet
      • Trusted Sites
      • Restricted Sites
    5. Click OK to save your changes and close the Internet Options window.
  5. Run the test.

Run a Selenium Integration Test on a Remote Browser

This topic describes how to run a Selenium Integration test case on a remote browser. The remote browser can be Mozilla Firefox, Google Chrome, or Internet Explorer 8.0 or later.

Follow these steps:

  1. Download the Selenium Server and save it to a local directory.
    1. Go to http://www.seleniumhq.org/download/.
    2. Locate the Selenium Server stand-alone .jar file in the Selenium Server (formerly the Selenium RC Server) section and download it.
  2. Verify that the driver for the browser that you want to use is available on the remote computer.
  3. On the remote computer, run the following command from a command prompt:
    java -jar selenium-server-standalone-2.xx.0.jar -role hub
    
  4. On the remote computer, run the following command from a new command prompt:
    java -jar selenium-server-standalone-2.xx.0.jar -role node -hub http://localhost:4444/grid/register -Dwebdriver.chrome.driver=c:\lisa-se\chromedriver.exe -Dwebdriver.ie.driver=c:\lisa-se\IEDriverServer.exe
    
  5. On the local computer, add the following properties to the project configuration file you use for running test cases on the remote browser.

    If you plan to run Selenium Integration tests on multiple browsers, create a project configuration file for each browser type. You can then run the tests on multiple browsers by making different configuration files active for each test run. For more information about configuration files, see Configurations.

    Note: You must add these properties to project.config before you add them to other project configuration files.

  6. Right-click the selected project configuration file in the Project panel and select Make Active.
  7. Run the test.

    The test runs on the selected browser on the remote computer.

    Note: For more information about using Selenium Server in a Grid configuration, see https://code.google.com/p/selenium/wiki/Grid2.