How to Determine What Data Will Be Replaced

Applies to LoadComplete 4.97, last modified on May 20, 2019

Usually, when you create a data replacer, you may want to check whether it will replace the correct data. You can do it in the following ways:

Checking Data Replacers in the Create Data Replacer Wizard

When you create a new data replacer with the Create Data Replacer wizard, you can check what data the replacer finds on the Specify the regular expression to use page of the wizard.

The wizard shows the created regular expression and the request content with the matching data highlighted. If several text fragments match the regular expression, you can select each of them in the list, to view the corresponding fragment.

If no matching data is found, the wizard page displays a notification about it.

If needed, you can modify the created regular expression.

For information on how to create data replacers by using the wizard, see Create Data Selector Wizard.

Checking Data Replacers in the Scenario Editor

With the Create Data Replacer Wizard
  1. Open your scenario and select a request or WebSocket message that contains the data replacer you would like to check.

  2. In the Data Replacers panel of the request, find the needed data replacer.

  3. Click the ellipsis button in the Expression column of the replacer.

  4. LoadComplete will open the Create Data Replacer wizard with the value matching the regular expression highlighted in the request contents.

    If the matching value is not found, the wizard will show a notification.

Notes
  • This approach is supported only for individual requests. To learn how to check data replacers on the scenario level, see below.

  • This approach is not applicable if the data replacer’s search pattern is specified by a variable.

With the Find Dialog
  1. Open your scenario and find the data replacer you want to check.

  2. Copy the replacer’s regular expression to the clipboard. To do this, right-click the Expression cell of the replacer and click Select All. Right-click the cell once again, and then click Copy.

    If the regular expression is specified by a variable, find that variable in your project’s variable list and copy the variable value (if it is available).

  3. Click on the editor’s toolbar or press Ctrl+F (the shortcut is by default, you can change it any time in the Customize Keyboard dialog). This will call the Find dialog.

  4. In the dialog, paste the copied regular expression to the Find what box.

  5. Expand the Find Options section.

  6. Select the Use check box and choose Regular Expressions from the drop-down list.

  7. Click Find Next to start searching. LoadComplete will find a request that contains the sought-for text and highlight the matching text in the request’s contents.

See Also

About Data Replacers
Using Variables in Requests
Finding Text in the Scenario Editor
Finding Text in the Scenario Editor

Highlight search results