Inserting a custom log message into a UI test script
You can insert a custom log message into the test script of Web UI, Windows, or mobile tests to differentiate a set of steps related to a task in the unified report. For example, you can add custom messages to demarcate the test steps related to order generation, user creation, or report generation in an application.
Before you begin
You must have completed the following tasks:
- Recorded a Web UI, Windows, or mobile test. See Testing in the UI Test perspective.
- Read and been familiar with the usage of variables. See Declaring and assigning test variables.
- Read and been familiar with the substitution of values by using a dataset. See Associating a dataset with the test.
Procedure
- Expand the Tests folder to locate the required test in the Test Navigator pane.
- Double-click the test to open it.
-
Select the test step for which you want to insert the custom log message, and then
click
.Or right-click the step, and then click.A Log Message step is inserted before the selected test step.
- Enter the text that you want to include in the report in the Message text box under the Log Message Details pane.
- Optional:
Select the text in the custom log message and substitute it with the value of a variable or
a dataset.
During the playback, the value of the variable or dataset replaces the text marked for substitution. You can view these substituted custom log messages in the unified report after the test run.
- Click to save the changes.