- Getting started with the UI Testing
In this tutorial, you will learn the fundamental concepts of the UI Test, such as recording a test, adding a verification point, abstracting data by using data pool, adding a loop, running a test and a compound test, and viewing test results.
- Lesson 1: Recording a test scenario
With the UI Test perspective, you can initiate the recording of a specific test scenario on your web application. Typically, you would create smaller test scenarios for better maintenance. When you start a recording, HCL OneTest™ UI automatically captures the actions that you do on the web application. To ensure that the recorder captures each action correctly, wait till the web pages are loaded completely. You can later remove this extra ‘waiting time’ (Think time) that is spent in the recording when you play back a test. After you stop the recording, the test is generated.
- Lesson 2: Adding a verification point
In this lesson, you will learn how to add a verification point to a test step.
- Lesson 3: Running the test
After modifying the test script, you can now run the test to check if the test scenario is played back successfully.
- Lesson 4: Viewing test results
The reports display whether the test run was successful. The UI Report is the primary report for a Web UI test. It displays each of the steps with the screenshot of the UI and the overall response time. If a test run fails, the error message is displayed against the step in the report.
- Lesson 5: Modularize the test script
In this tutorial, you recorded a test scenario in which you signed in to the web site, browsed for a product, and saw pricing details. In the actual scenario, you would have also recorded how to purchase, check out the product, and sign out of the website. You would have done that to avoid recording the same application multiple times. However, maintaining a big test script with a lot of data can be difficult. After the recording, you can modularize the test script by splitting it at appropriate steps and thereby creating meaningful chunks of test scripts. For example, for the test scenario in this tutorial, you can split the ‘Sign in’ and ‘Choosing the product’ steps and create two test scripts out of it. You can then add these scripts to a Compound Test to run in sequence.
- Lesson 6: Abstracting data by using a dataset
When you record a test, you perform a sequence of steps that you expect a user to perform. When you run this test, it uses the same data that you used during recording. However, in a real-life scenario, although a user might follow the same steps, the data that they enter into the application might be different at different point of time. To vary the data in the test, you use a data pool, which contains variable data. At run time, this variable data is substituted for the actual data in the recorded test.
- Lesson 7: Associating the dataset with the test
By default, at run time, the data pool values are accessed sequentially. You can specify whether the test uses the data pool values randomly or in a shuffled manner. If you have a long list of data pool values that are used by multiple tests from the same workspace, you can share a data pool.
- Lesson 8: Running multiple test scripts in a sequence
You can create compound tests to help you organize smaller tests into scenarios that can then be run end-to-end. You can combine tests from different extensions to achieve end-to-end flow.
- Lesson 9: Adding a loop
You will add a loop to the test so that the test is repeated to fetch all of the values from the data pool. Because your dataset has three entries, the test must run at least three times.
- Summary: Getting started with the UI Testing
In this tutorial, you learned how to record a test, modify it by creating a data pool and associating it with the test, adding a verification point, adding a loop, running a test, and viewing test results. You also learned how to break a single test into smaller tests that can be run as part of a compound test.