Running a Web UI test

To verify that a web application works as designed, run the test in a browser. Optionally, you can run the test in more than one browser at a time to speed up your test effort. Before running the test, you can choose to use a specific browser profile for the test.

Before you begin

You must have completed the following tasks:
  • Recorded a Web UI test. See Recording a Web UI test.
  • Ensured that the Scale and layout in the display settings of the system match with the settings used to create the test.
    Note: The display scaling must always be 100%.
  • Read and completed the tasks mentioned in Prerequisites to running Web UI tests if they apply to the test that you want to run.
  • If the packaged drivers for the Google Chrome, Microsoft Edge, and Opera browsers are not compatible with the browsers installed on your computer, during the playback, a link is provided in the Run Configuration dialog. You must click the link to install the appropriate driver and only then continue with the playback of tests.
    Important: If you do not resolve the driver incompatibility with the browser, and continue with the test run, the following events can occur.
    • The incompatible driver is started in the background, but the browser is not visible to you.
    • The test fails to run on the selected browser.
    • You cannot start another test run as the incompatible driver still runs in the background.

    To resolve the issue, you must manually end all instances of the browser drivers that run in the backround, and then install the compatible driver as indicated in the Run Configuration dialog before you attempt another test run.

    When you play back Web UI tests on a remote computer, you can choose to automatically resolve the browser and driver incompatibility of the Google Chrome, Edge, and Opera browsers by selecting the Fix the browser driver incompatibility checkbox.

    Only those web browsers that are installed on your computer and supported by the Web UI extension are displayed in the list. To run a web test on a mobile device or emulator, the device must be connected and must be in the passive mode.

About this task

You can run a Web UI test in the same web browser that was used for the recording or run the test in other web browsers. You can even run a Web UI test in several browsers simultaneously. You can also run the test as part of keyword execution from IBM® Engineering Test Management, as part of compound test, or from the Command Line Interface (CLI).

Procedure

  1. Double-click the test to open it from the Test Navigator view.
  2. Click Run Test to run an individual test or Run Compound Test to run a compound test in the Test editor.
    The Run Configuration dialog is displayed.
  3. Select the run configuration options as required for the test run.
    The options are described in the following table:
    Option Action
    Run on several devices and browsers in parallel Select this checkbox to view and select the devices and browsers on which to run the test.
    Restriction: Use of multiple displays (monitors) on Mac operating systems to play back recorded tests on any supported browser is not supported.
    Run using Click the displayed browser name in this column to select the web browser on which to run the test.

    If the browser driver is incompatible, then Test UI provides a download link to download the correct version of the driver. After you click the click here link, you can view the progress bar and relevant messages that indicate the result of the driver download process.

    If the download fails, you must manually download the driver and place it in the configuration folder.

    Collect data to update test steps Select this checkbox if it is cleared to apply guided healing.
    Automatically update the test at end of the playback Select this checkbox to apply self-healing if you have selected Collect data to update test steps option.
  4. Click Next.
    The Advanced playback options page is displayed.
  5. Select the advanced playback options as required for the test run.
    The options are described in the following table:
    Option Action
    Global steps delay in milliseconds Select this checkbox and specify the duration of delay in milliseconds to set the delay between all the steps in the test.
    Clear browser data Select this checkbox to optimize the performance of web browsers.
    Private Mode Select this checkbox to run tests in the private mode.
    Launch browser with arguments Select this checkbox to specify the arguments to be used by the browser, and then enter the arguments in the text box. You can enter multiple arguments separated by a semicolon. For example,

    -<param1>;-<parama2>

    Note: If you select this checkbox, the option remains selected for the subsequent test runs. You can then clear the checkbox if required.
  6. Click Next.
    The Performance Measurement page is displayed. The options on this page are applicable only for mobile tests and they are disabled for Web UI tests.
  7. Click Finish.
    The selected web browser opens and the test is played back. Do not perform any action on the web browser while the test is playing back. The statistical and live reports show the live data as the test is played back.

Results

After the test run completes, the unified report, statistical report, and the test log are displayed. When running the test in multiple browsers, a single report is displayed for all browses. To view a functional report, you must generate it manually by right-clicking a report in the Results folder and clicking Generate Functional Test Report. The Resources tab in the statistical report is empty because a Web UI test does not monitor resources.