Creation of Web UI tests
HCL DevOps Test UI (Test UI) provides multiple ways to create Web UI tests using the UI Test perspective. You can create a Web UI test that captures both functional and HTTP traffic in the same recording. In addition, you can create a Web UI test for a web application that is already running in an instance of the Chrome, Firefox, or Safari browser. You can also initiate a recording from a step of an existing test. You can also play back tests on Microsoft™ Edge browser but they must be recorded on Chrome, Firefox, or Internet Explorer.
Recording a Web UI test that captures both functional and HTTP traffic in the same recording
With this style of recording, Test UI starts the browser and configures the test environment before you start the recording. This style of recording provides a unified recording capability that lets you capture both functional and HTTP traffic in the same recording. As a result, you can generate both a Web UI functional test and an HTTP load test from the same recording session.
Support is provided for Chrome, Firefox, and Internet Explorer on Windows™ computers, Chrome and Firefox on Linux® computers, and Chrome and Firefox on Macintosh computers.
Recording a Web UI test using a running browser instance
Support is provided for Chrome and Firefox on Windows™ and Linux® computers and for Safari, Chrome, and Firefox on Macintosh computers. Internet Explorer is not supported.
Recording Web UI steps to add to an existing test
If you already have a test and want to add more steps to it, open the test and initiate the recording from a step after which you want to add the new steps. This style of recording is useful when the task flow of an application has changed in a newer version of the application and you want to update the existing test script.
Recording a Web UI test in the private mode of a browser
Using browser arguments during the recording a Web UI test
Before you start recording Web UI tests, you can specify the arguments to be used by the browser. Test UI launches the browser with the specified arguments. You can specify multiple arguments separated by a semicolon.
Variable for storing the name of the browser used to record the test
Prior to 9.1.1, you could define a variable in a test to specify the web browser to use for running the test. The feature was available for running a test from the command line, as part of a schedule from HCL DevOps Test Performance, or from IBM® Engineering Test Management. The reserved name for this variable is RTW_WebUI_Browser_Selection. However, after defining the variable, if you ran the test from the Web UI Test perspective, the browser selected in the Run configuration dialog took precedence over the browser specified in the variable.
Now, Test UI creates a test variable automatically whenever a new Web UI test is recorded or when an old test is used that does not already have this variable defined.
You can use this test variable in If conditions to assign different behavior for different browsers. Doing so allows you to create more robust tests that will run successfully in more than one browser.
During test execution, the value of the test variable is set to the name of the browser on which the test is being run. If you select Firefox in the run wizard, the value of the variable is set to Firefox, thus ignoring the original value that was set in the test during recording or while editing the test. For a command line or a Schedule execution, the value that was set in the test is used, since in these cases there is no run wizard.
During test execution, an If condition accepts the following value names:
- Firefox
- Chrome
- Internet Explorer
- Safari
- Microsoft™ Edge
Recording Web UI steps using the application designs
You can start testing activities in the early stages of development for web applications by using designs. As soon as the design is ready, you can use the wireframe to configure the application in Test UI and create tests. In the later stages of development, when the user interface is ready, you can add screen captures of applications to configure and create tests. When the application is deployed, you can run the test with guided healing enabled for updating the tests with the latest screen captures.For more information, see Overview of design driven testing.