Reusing tests on different hosts: Server connection variables
Your tests represent a significant investment in time and effort. You can share or reuse them for different configurations and web hosts by changing the variables for the host name and port.
Before you begin
About this task
Procedure
To change the name of the host or proxy server on all
requests in a test:
- In the Test Navigator, browse to the test and double-click it. The test opens.
- Expand the Test Variable section at the top of the test, and click the Server Connection variable that contains the hostname that you want to change.
- In the Test Element Details area, perform the following
steps:
- Type the new host name in the Host field.
- Optional: Type a new port number in the Port field.
The new hostname and port combination is correlated to the test variable, which contains the value currently being used.
Results
Note: To change the host names and ports of many tests, put
the server connection variable in a dataset and associate the dataset
with the tests. When you change the name and port in the dataset,
that change is propagated throughout the tests in the dataset. For
more information, see Creating a dataset associated with a test.