This topic explains how to determine which browser is used to play previously-recorded scenarios. This allows you to setup cross-browser testing. For information on how to playback/execute recorded browser tests, see Executing Functional Tests.
About Browser Playback Options
By default, the browser used for recording the web scenario is also the browser used for playback, but you can configure the scenario to play back in a different browser or all available browsers. You can also create configurations that allow you to specify which browsers to use for playback at runtime.
If you want to ensure that a scenario is played only in the browser with which it was recorded, you can configure the scenario to be played only in the specified browser. This is provides assurance when, for example, the web page structure is significantly different on other browsers, requiring the scenario to be constructed differently for those browsers.
Modifying Browser Playback Settings
The scenario’s browser playback settings are used during playback unless another option is explicitly selected as described in Specifying the Browser at the Time of Playback:
- Double-click on the scenario to open its configuration panel.
- Open the Browser Playback Options tab.
- In the Default Browser Playback section, enable the browser(s) you want the scenario to use to play the scenario back.
- Enable one of the following options in the Browsers Supported section:
- Browsers specified here only: Enable this option to ensure that the scenario is only played in the specified browser.
Any browser: Enable this option to allow the scenario to be played in additional browsers that may be specified in the test configuration, in addition to the browsers specified in the scenario.
- By default, the browser GUI is enabled, but you can choose Custom from the drop-down menu and enable the Headless option. In Headless mode, the browser will not be visible while the scenario runs.
Specifying the Browser at the Time of Playback
You can override the scenario’s browser playback settings at the time of execution if the scenario does not have Run in specified browser only enabled by configuring your Run Configuration to use the desired browser (via Execution tab settings), then running the action suite with that Run Configuration.
- Select the web scenario’s Test Case Explorer node.
- Choose the desired Test Configuration from Parasoft> Test Using> Built-In> Functional Testing
- Run Web Functional Tests in All Browsers: Executes each test in all available browsers.
- Run Web Functional Tests in Browser Specified by Tests: Executes each test using the browser playback settings configured in the test scenario’s Browser Playback Options tab. If you have multiple scenarios, each with different browser playback settings, this Test Configuration would run all the scenarios in the designated browser(s).
- Run Web Functional Tests in Chrome: Executes each test in Chrome. If a test was configured to run only in Internet Explorer and/or Firefox, no testing will be performed.
- Run Web Functional Tests in Edge: Executes each test in Microsoft Edge. If a test was configured to run only in Internet Explorer and/or Chrome, no testing will be performed.
- Run Web Functional Tests in Firefox: Executes each test in Firefox. If a test was configured to run only in Internet Explorer and/or Chrome, no testing will be performed.
- Run Web Functional Tests in Internet Explorer: Executes each test in Internet Explorer. If a test was configured to run only in Firefox and/or Chrome, no testing will be performed.