Configuring Test Controllers and Test Agents for Load Testing
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.
Requirements
- Visual Studio Ultimate
Load Simulation Architecture
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:
Local configuration:
- 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.
Test Agent and Test Controller Interaction
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.
Test Controller
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.
Test Agent
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 with Visual Studio.
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.
Test Controller and Test Agent Connection Points
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 Ports for Test Controllers and Test Agents.
Test Controller and Agent Installation Information
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 Test Agents and Test Controllers and Test Controller and Test Agent Requirements for Load Testing.
Using the Test Controller and Test Agent with Unit Tests
After you have installed a test controller and one or more agents, you can specify whether to use a remote execution with the test controller in the test setting for 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.
See Also
Tasks
How to: Run a Load Test Using Test Controllers and Test Agents Specified in a Test Setting
How to: Run a Test Using Test Controllers and Test Agents
Walkthrough: Using a Test Controller and Test Agents in a Load Test
How to: Create a Test Setting for a Distributed Load Test
How to: Access Load Test Results for Analysis
Concepts
Testing Performance and Stress Using Visual Studio Web Performance and Load Tests
Test Controller and Test Agent Requirements for Load Testing