Optimizing the playback time of a test

When you play back a Web UI test, by default, the test collects a lot of data. This data includes screen shots, response time breakdown data, and highlighted UI controls. The size of a test depends upon the data it contains; playback time increases as the size of a test increases. To optimize the playback time, you can choose to collect only the data which you need.

About this task

For example, when you play back a test, screenshots of all of the steps are captured and shown in the Mobile and Web UI report. Most of the times, you might require screenshots only for the failed steps.
Note: For the Safari browser, you can capture only the web page screenshots.

Also, if the computer on which you are playing back the test is locked or you are working on other applications on that computer, the captured screenshots will either be dark black or belong to applications that are not relevant to the test. When you capture only page screenshots, you can lock the screen or work on other applications on the computer.

Similarly, you might be interested only in testing the functionality of the application, and the performance testing might be covered by someone else. You can choose not to capture the response time breakdown data thereby improving the speed of the playback of your test.

You can apply playback optimization options for the test or for the workbench (in Preferences). When you set the optimization options for the workbench, only the desktop screenshots are captured and applied to all of the tests. When you import a test for playback, the configurations on your workbench are used by the test. When you set the optimization options for the test, you can choose to capture screenshots for pages or desktop. To apply playback configurations at the test level, use the pre-defined variables and values mentioned in the table.
Table 1. Variables for Playback Optimization
Variables Values Description
webui.report.screenshots
Note: If this variable is not set, desktop screenshots for all of the steps are captured.
DISABLE Stop capturing screenshots for all the steps
PAGE* Capture the screenshots of pages for all of the steps
PAGE_ONFAIL Capture the screenshots of pages for only the failed steps
PAGE_ONVP Capture the screenshots of pages for all of the verification points
PAGE_ONVPFAIL Capture the screenshots of pages for only the failed verification points
PAGE_ONFAIL_AND_VP Capture the screenshots of pages for only the failed steps and all of the verification points
DESKTOP Capture the screenshots of desktop for all of the steps
DESKTOP_ONFAIL Capture the screenshots of desktop for only the failed steps.
DESKTOP_ONVP Capture the screenshots of desktop for all of the verification points
DESKTOP_ONVPFAIL Capture the screenshots of desktop for only the failed verification points
DESKTOP_ONFAIL_AND_VP Capture the screenshots of desktop for only the failed steps and all of the verification points
webui.responsetime False Do not collect response time
webui.highlight False Do not highlight UI controls during playback

Test with variable to capture page screenshots

* If you specify the PAGE value, screenshots are captured differently on different web browsers and take more time:
  • Google Chrome
      • The portion of the web page that is hidden under the scrollbar is not captured.
      • The browser is in focus even when minimized.
  • Internet Explorer
    • The portion of the web page that is hidden under the scrollbar is captured but in black.
    • The browser window resizes often while the screenshot is taken.

Procedure

To apply playback optimization options for the workbench:

  1. In the workbench, click Window > Preferences > Test > Test Execution > Web UI Playback.
  2. To capture the screenshots of only the web browser page that runs the application under test, select the Capture browser page screenshots check box.
  3. To capture screenshots, ensure that Take screenshots while playing back check box is selected, and select one of the options to take screenshot for.
  4. To collect performance data, ensure that the Collect performance data check box is selected. If the check box is not selected, the response time breakdown (On App/Off App) data is not collected and the related report is not generated.
  5. To highlight the recorded page elements during playback, ensure that the Highlight the page element check box is selected.
  6. Click OK.

What to do next

You can now play back the tests.
Feedback