How to Change Recorded Hostnames/Edit Recorded URLs - Web Performance
Menu

How to Change Recorded Hostnames/Edit Recorded URLs

Users occasionally ask how to update URLs or hostnames in a recorded testcase so that a recording can be used with a new URL or server. Editing recorded hostnames may be necessary for several reasons, including:

Typical Situations and Methods of Editing Recorded Hostnames

Web Performance Tester offers several tools for changing recorded hostnames. Below, I describe common situations testers may experience and the appropriate method of changing datasources.

1. In the simplest case, a single new hostname must replace a single recorded hostname. In this situation, use the URL Editor. The URL Editor allows testers to enter a new datasource for a recorded hostname. All future tests will redirect traffic through the edited datasource.

2. Complicated websites often pull content from numerous locations. In these cases, changing from one server to another may require more configuration than simply swapping one hostname with another. In this instance, testers have two options:

Choosing a Method

In summary:

If you reach the new target server through a different hostname in your browser, use the URL Editor or Fields View to edit the datasource of a recorded hostname.

If you reach the new target server by using the same URL in your browser and editing your OS HOSTS file, use Load Tester’s custom HOSTS file.

Performing Each Method

The following sections contained detailed steps for performing each method of editing recorded hostnames.

NOTE: The following methods are only applicable to “Virtual Browser” recordings.

URL Editor

The URL Editor may be used to replace all instances of a recorded hostname with a new hostname.

To edit datasources using the URL Editor:

1. In the navigator panel, select a recording.

2. Switch to URL Editor mode by selecting “Options -> View -> URL Editor.”

3. In the “Datasource” column, select the field which corresponds to the recorded URL, then click the “…” icon to open the “Edit Field” menu.

4. From the “Edit Field” popup menu, expand the drop down menu beside “Datasource” and select the “Text Constant” option.

5. After selecting “Text constant,” replace the current datasource with a new value and click “OK.”

6. The URL listed in the “Datasource” column will reflect the new value.

7. After editing the datasource and returning to the “Stepped Order” view, the hostname appears with a green background. The green background indicates that future tests will redirect traffic through the edited datasource.

Fields View

The Fields View allows users to view each recorded instance of a connection with the hostname. This tool allows users to edit individual entries.

To edit datasources using the Fields View:

1. In the navigator panel, select a recording.

2. In the inspection window located in the lower half of the Web Performance application, select the “Fields” tab.

Note: If the “Fields” tab states “Select a Testcase, Web Page, or Transaction containing fields,” in the testcase editor window, select “Options,” then “View” -> “Stepped Order.”

3. Expand the dropdown menu located at the right corner of the window and select “Hostnames.”

4. Select each entry for which the datasource needs to be changed, right click, and click “Edit.”

5. From the “Edit Field” popup menu, expand the drop down menu beside “Datasource” and select the “Text Constant” option.

6. After selecting “Text constant,” replace the current datasource with a new value and click “OK.”

7. After editing a datasource and returning to the“Fields View” view, edited entries appear with a green background. The green background indicates that future tests will redirect traffic through the edited datasource.

Custom HOSTS file

If you must access a web application through a specific recorded hostname, configure a Custom HOSTS file to redirect traffic to a different IP address.

To edit the datasource by configuring the HOSTS file:

1. In the toolbar, select “Tools,” then select “Open custom HOSTS file.”

2. Create a new entry to assign an existing hostname to another hostname or IP address.

Load Tester will use the custom HOSTS file during future load tests.

Verifying the Change

When editing individual datasources, missed entries may reduce testcase accuracy or result in errors. Unedited entries that receive a valid response from the original datasource may be difficult to find.

Pro Tip: “After running a replay, Options -> View -> Flat URL Comparison. Click the URL column to sort by URL, then scan down the list for any names that look out of place”. – Frank

Users may also edit the HOSTS file to redirect traffic for the original hostname to an invalid address. Unedited entries will return an error rather than a potentially valid response.

-Michael

Add Your Comment

You must be logged in to post a comment.

Resources

Copyright © 2024 Web Performance, Inc.

A Durham web design company

×

(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
How Many Concurrent Users