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:

Procedure

  1. Expand the Tests folder to locate the required test in the Test Navigator pane.
  2. Double-click the test to open it.
  3. Select the test step for which you want to insert the custom log message, and then click Insert > Log Message.
    Or right-click the step, and then click Insert > Log Message.
    A Log Message step is inserted before the selected test step.
  4. Enter the text that you want to include in the report in the Message text box under the Log Message Details pane.
  5. 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.
  6. Click File > Save to save the changes.

Results

You have inserted a custom log message into the test script.

What to do next

You can run the test and verify the inserted log message in the unified report. See Running a Web UI test.