When you record traffic, LoadComplete automatically records web server URLs to which you send requests. You can view the list of those server URLs in the Host List table of the Scenario editor.
You may need to re-use your scenario for servers other than the one for which you recorded the scenario. For example, you may have a scenario originally recorded against a test server and you want to run it against a pre-production server.
You can change the target server to which a scenario sends requests.
Changing the Target Server for a Scenario
Changing the Target Server for Individual Connections in a Scenario
Besides changing the tested server in the scenario, you may also need to change the server whose performance LoadComplete measures. To learn how to do this, see Managing Server-Side Performance Counters. |
Changing the Target Server for a Scenario
To retarget all requests in a scenario to another host:
-
Open the scenario in the Scenario editor.
-
In the Host List table of the scenario editor, find the server you want to change.
-
In the Simulated Host column, enter the name of the target host.
You can also use variables to specify the target server. In the Simulated Host column, enter the variable name in the
@Variable_Name
format or click and select the variable in the resulting dialog. -
Save the changes.
Changing the Target Server for Individual Connections in a Scenario
-
Open the scenario in the Scenario editor.
-
Click Connections on the editor’s toolbar to group all requests by the connections over which they were sent.
-
In the Scenario Explorer, select the connection for which you want to change the target server.
-
In the Operation Editor panel, enter the new server URL and port for the connection.
-
Save the changes.
When you run the scenario, LoadComplete will send all requests that belong to that connection to the needed server.
Changing the Server in Request Parameters
In certain cases, a request can specify the target server as a URL parameter:
GET /go.asp?location=http%3A%2F%2Fstore.testserver.intranet.mycompany.com%2Findex.asp
To retarget the request to another server, replace the recorded server URL with the needed URL:
-
Open the scenario in the Scenario editor.
-
Find the request that you want to retarget.
-
Replace the recorded URL in the request with the needed server URL:
In GET Requests
-
Expand the Request node and examine the request parameters under the Query node.
-
Find the parameter that includes the server URL.
-
In the Value column, replace the recorded URL with the needed URL.
In POST Requests
-
Switch to the Request Body tab of the request.
-
Find the parameter whose value includes the recorded server URL.
-
Replace the recorded URL with the needed server URL.
You can use variables to specify the target server. Replace the recorded URL with the variable that stores the needed value. Enter the variable name in the
@VariableName
format. -
-
Repeat previous steps to replace all instances of the recorded URL with the needed URL in all requests.
-
Save the changes.
See Also
Editing Scenarios
About Scenario Editor
About Load Test Editor
Managing Server-Side Performance Counters