Creating a test by using existing steps of a test with the personal agent
You can create a new test by adding additional steps to an existing Web UI test. With the help of a personal agent, you can play back the existing test in a live browser and then continue to record the additional steps for the test. The newly recorded actions are appended to the test after the existing steps.
Before you begin
You must have completed the following tasks:
- Ensured that you are a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
- Read and understood the information in Edit branch overview.
- Ensured that your project contains an application and at least one existing test.
- Installed and started the personal agent. See Installing and starting the personal agent.
About this task
When you initiate the recording, depending on the
scenario, one of the following error messages might be displayed:
| Scenario | Error message |
|---|---|
| You closed the browser without recording any new step. | No new steps were recorded. At least one step is required. |
| The playback of the selected test failed. | The recorder encountered a problem: The selected test did not pass during playback. |
| The selected test does not contain any Open step to launch the browser. | The recorder encountered a problem: The selected test does not contain any browser launch steps. |
Procedure
-
Log in to Test Hub.
The Projects page of the initial team space is displayed.
-
Click to open the project that contains the test assets.
The Overview page of the project is displayed.
-
Click .
The Test Editor page and the test navigator panel are displayed.
-
Perform one of the following actions:
- Click on the Test Editor page.
- Click the Action menu icon in the test navigator panel and click Test.
- Right-click the application in the test navigator panel and select .
The Edit branch dialog is displayed. -
Select your action to either select an existing Edit branch or create
an Edit branch:
- Perform the following steps to select an existing Edit
branch:
- Select Use an existing edit branch.
- Select an Edit branch from the Select
branch list if Edit branches already
exist for your repository.Note:A warning message is displayed if the Edit branch, you selected is behind the source branch. To update the selected edit branch and maintain synchronization with the source branch, you can select the Update branch option when switching checkbox.
- Click Ok.
- Perform the following steps to create the Edit branch:
- Select Create new edit branch.
- Enter a name for the Edit branch in the Branch Name field.
- Click Save.
- Perform the following steps to select an existing Edit
branch:
- Select an application for which you want to create a test from the Application drop-down list.
- Enter a name for the test in Asset Name.
-
Click Next.
The Source tab is displayed.
-
Select Record after existing test from the Select source drop-down list.
The file tree selector is displayed. The list displays the existing test assets in the project.
-
Select an existing test that you want to use as the starting point.
The status of the personal agent is displayed in the Agent section. If the agent is installed and available for playback and recording, then the Record button is displayed.
- Select a browser from the Browser drop-down list and then select UI from the Interactions drop-down list.
-
Click Record.
The selected test is replayed by using the personal agent in the selected browser. The progress bar shows the playback while the agent continues the playback. You must wait until the playback is complete.
After the playback is complete, the status changes to Interact with the browser session and close it once done. The browser is live so that you can continue with the new steps.
- Record the additional steps in the browser.
-
Close the browser when you finish recording.
The progress bar displays The asset is now ready for your review message, and the Done button is enabled.
-
Click Done.
The new test opens in the editor with the selected existing test listed as a run module. The newly recorded steps are added after the original steps.
Results
What to do next
You can perform the following tasks:
- Run the updated test and view the results. See Running a Web UI test.
- Edit the test in Test Editor. See Editing a Web UI test.