Configuring Test Controllers and Test Agents for Load Testing
This topic applies to:
Visual Studio Ultimate
Visual Studio Premium
Visual Studio Professional
Visual Studio Express
Visual Studio Ultimate can use a computer or a group of computers to generate simulated load for testing, and to run tests remotely and concurrently on several computers. This group of computers consists of a single test controller and one or more test agents. You can use the test controller and test agent to generate more load than a single computer can generate alone or just test remotely.
The load simulation architecture consists of a Visual Studio client, test controller, and test agents.
The client is used to develop tests, run tests, and view test results.
The test controller is used to administer the test agents and collect test results.
The test agents are used to run the tests, and collect data including system information and ASP.NET profiling data defined in the test setting.
This architecture provides the following benefits:
The ability to scale out load generation by adding additional test agents to a test controller.
Flexibility for installing the client, test controller, and test agent software on the same or different computers. For example:
Machine1: Visual Studio, controller, agent.
Typical remote configuration:
Machine1 and 2: Visual Studio (multiple testers can use the same controller).
Machine3: Controller (can have agents installed, too).
Machine4-n: Agent or agents all associated with the controller on Machine2.
Even though a test controller typically manages several test agents, an agent can only be associated with a single controller. Each test agent can be shared by a team of developers. This architecture makes it easy to increase the number of test agents, thereby generating larger loads.
The test controller manages a set of test agents to run tests. The test controller communicates with test agents to start tests, stop tests, track test agent status, and collect test results.
The test controller provides a general architecture for running tests, and includes special features for running load tests. The test controller sends the load test to all test agents and waits until all the test agents have initialized the test. When all test agents are ready, the test controller sends a message to the test agents to start the test.
The test agent runs as a service that listens for requests from the test controller to start a new test. When a request is received, the test agent service starts a process on which to run the tests. Each test agent runs the same load test.
Test agents are assigned a weight by the administrator, and load is distributed according to a test agent’s weighting. For example, if test agent 1 has a weighting of 30, and test agent 2 has a weighting of 70, and the load is set to 1000 users, then test agent 1 simulates 300 virtual users whereas test agent 2 simulates 700 virtual users. For more information, see Managing Test Controllers and Test Agents.
The test agent takes as input a set of tests and a set of simulation parameters. A key concept in Visual Studio Ultimate is that tests are independent of the computer on which they are run.
Installing a test agent on a machine that is part of a Network Load Balancer setup is not supported.
The following illustration shows the connection points between the test controller, the test agent, and the client. It outlines which ports are used for incoming and outgoing connections as well as security restrictions used on these ports.
For more information see Configuring a Test Controller and Test Agent Across a Firewall.
For important information about hardware and software requirements for test controllers and test agents, the procedures for installing them, and configuring your environment for optimal performance, see Installing and Configuring Visual Studio Agents and Test and Build Controllers and Test Controller and Test Agent Requirements.
Once you have installed a test controller and one or more agents, you can then specify the use of a remote execution with the test controller in the test setting that you use when you run your load tests. Additionally, you can specify the data and diagnostic adapters to use with the role that is associated with the agents in the test setting. For more information, see How to: Create a Test Setting for a Distributed Load Test and Setting Up Machines and Collecting Diagnostic Information Using Test Settings.
Visual Studio Ultimate lets you use up to 250 virtual users on a local load test run. If your load testing requires more virtual users, or you want to use remote machines, you must purchase Visual Studio Load Test Virtual User Pack 2010. You can purchase Visual Studio Load Test Virtual User Pack 2010 where you purchased Visual Studio Ultimate. For more information, see Managing Your Virtual User Licenses for Load Testing with a Test Controller and Configuring Test Controllers and Test Agents for Load Testing.
The Visual Studio 2010 Load Test Feature Pack provides active Microsoft Visual Studio Ultimate 2010 with MSDN subscribers a unique Visual Studio Load Test Virtual User Pack 2010 license key to generate unlimited virtual users.
To download the feature pack, which is available for MSDN Subscribers only, visit MSDN Subscribers Downloads. For more information about the feature pack, see Microsoft Visual Studio 2010 Load Test Feature Pack.
Visual Studio Load Test Virtual User Pack 2010 licenses use multiprocessor architecture, which allows the machine on which they are installed to use more than one processor.
The number of virtual users who are allowed on a local test run or remotely are as follows:
Local load test run without Visual Studio Load Test Virtual User Pack 2010 installed: If you use Visual Studio Ultimate without a Visual Studio Load Test Virtual User Pack 2010 installed on your local machine, you are limited to 250 users. The local machine is also limited to one core on the client CPU.
If your load test starts with more than 250 virtual users, or increases the virtual user count during the load test beyond 250 users, it will stop with an error that indicates a license violation.
Local load test run with a Visual Studio Load Test Virtual User Pack 2010 installed: If you use Visual Studio Ultimate with a Visual Studio Load Test Virtual User Pack 2010 installed on your local machine, you can run a load test that uses up to the maximum number of virtual users for whom you have purchased licensing.
If you use more virtual users than your license limit, it will not stop the run, but it will add an error into the load test results and into the Application event log on the machine.
Adding a Visual Studio Load Test Virtual User Pack 2010 in a nontest controller scenario has the added benefit of unlocking all machine processors for use. Without a Visual Studio Load Test Virtual User Pack 2010, your local machine can use only the first processor. After you have added a Visual Studio Load Test Virtual User Pack 2010, load tests can use all processors on the machine when they run.
Remote load test run with Visual Studio Load Test Virtual User Pack 2010 installed by using a controller and agents: If you use Visual Studio Ultimate and have a test controller and one or more test agents installed with the required Visual Studio Load Test Virtual User Pack 2010, you can perform remote load test runs with the maximum number of virtual users for whom you have purchased licensing.
If you specify more virtual users than your license limit, it will not stop your run, but it will add an error into the load test results and into the machine's Application event log.
Adding Visual Studio Load Test Virtual User Pack 2010 License Keys
You can use the Microsoft Visual Studio Test Controller 2010 Configuration Tool to install Visual Studio Load Test Virtual User Pack 2010 license keys. For more information, see How to: Add Virtual User License Keys for Load Testing.
You can also add Visual Studio Load Test Virtual User Pack 2010 license keys from the command line by using either TestControllerConfig.exe or VSTestConfig.exe. For more information, see How to: Add Virtual User License Keys for Load Testing Using the Command-Line.
Visual Studio Load Test Virtual User Pack 2010 License keys are applied per machine. Therefore, if you have both Visual Studio Ultimate installed using more than 250 users and a test controller installed on the same machine, you must enter the license key only one time on that machine to enable the use of the virtual users in both tools.
To enable the newly added license key or keys to be recognized, you must restart the test controller service or Visual Studio Ultimate, depending on the tool that you used.
For more information, see Editing Load Patterns to Model Virtual User Activities.