Recently we needed to simulate real world load on a web application. We found that testing from multiple computers from within our office was not useful since we quickly saturated our internet connection. Using Microsoft Visual Studio Test Lab Manager you can use remote test agents, connect to the internet on different ISPs, to create additional external load.
Issue
Performing load testing that simulates high volume can be difficult. Recently we needed to perform load testing on a client application simulating 1000s of users hitting the site. Typically you might perform this type of load testing either by testing on your local network or making all the connections from your location to a remote server. The first test is useful for testing maximum load but ignores the impact of the public internet. The second test often does not give accurate results since you can quickly saturate your internet connection before reaching the desired load.
Test Lab Manager Using Remote Clients
In order to use remote clients you have to complete a few setup steps. The Test Lab Manager expects to be able to communicate with the Test Agents over a TCP/IP port and requires sufficient access to invoke the service on the Test Agents. The diagram below shows a simple configuration where the two test agents are on a local network.
In this configuration the Test Lab Manager can communicate with each Test Agent on the local network. Further, if the computers are all domain computers then configuring the Test Agents to use the Network Service account will work fine.
However, if the Test Agents are not on the domain then you will need to configure accounts on all computers with the same user name and password on all the machines in order to have Test Lab Manager be able to control the Test Agents. There are several good articles on how to do this:
http://blogs.msdn.com/dgorti/archive/2007/10/02/vstt-controller-and-agent-setup.aspx
http://blogs.msdn.com/edglas/pages/load-agent-and-load-controller-installation-and-configuration-guide.aspx
If possible get your test rig working on a local network first so you know the configuration of Test Lab Manager and the Test Agents is correct.
The next step is to have the Test Agents connect to the internet on a different ISP’s connection so we can simulate load from multiple locations. In order to do this we will need to accomplish two things:
- The Test Agents must connect via a VPN to the same network as the Test Lab Manager.
- You must configure the VPN connection to not use the default gateway on the remote network.
After you have completed step 1 your test rig should function correctly, but all the internet traffic from the Test Agents will be coming in via the VPN and then back out via your internet connection. This actually makes the problem twice as bad since now you have inbound and outbound traffic on the single internet connection.
In order to complete step 2 follow these steps:
- Go to Network Connections, select your VPN connection and right click and select Properties.
- Select Internet Protocol and click Properties.
- Click the Advanced button.
- Uncheck “Use default gateway on remote network”. (Note: I don’t recommend this setting for any other purpose then for this exercise. Bypassing the remote gateway can expose your internal network to the internet by bypassing your corporate firewalls.)

Now all of the communication between Test Lab Manager and the Test Agents will happen via the VPN, but the actual requests to the target web server will go via the Test Agent’s local ISP (shown below).

With this configuration you can now control any number of remote Test Agents all using their own internet connection to hit the target web server.