Running Unit Tests on Multiple Machines Using a Test Controller and Test Agents
This topic applies to:
Visual Studio Ultimate
Visual Studio Premium
Visual Studio Professional
Visual Studio Express
You can install a test controller and test agents using the Visual Studio Agents 2010 software so that you can use a group of computers to run your unit tests remotely and concurrently on several computers. For more information about installation, see Installing and Configuring Visual Studio Agents and Test and Build Controllers.
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, or decrease the amount of time it takes to run unit tests than a single computer can generate alone.
Typical remote configuration:
Machine1 and Machine2: Visual Studio (multiple testers can use the same controller).
Machine3: Controller (can have agents installed also).
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.
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. When the test controller processes unit tests and coded user interface (UI) tests, the test controller divides the tests into groups of 100 and sends them to a test agent machine. For example, if you have 250 unit tests and three test agents, the first 100 unit tests will be sent to agent1, the next 100 unit tests will be sent to agent2, and the remaining 50 unit tests will be sent to agent3.
The test controller provides a general architecture for running tests. When the test controller processes unit tests, the test controller divides the unit tests into groups of 100 and sends them to test agent machines. For example, if you have 250 unit tests and three test agents, the first 100 unit tests will be sent to agent1, the next 100 unit tests will be sent to agent2 and the remaining 50 unit tests will be sent to agent3.
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 unit test.
For more information, see Managing Test Controllers and Test Agents.
For important information about hardware and software requirements for test controllers and test agents, the procedures for installing Visual Studio Agents 2010, and configuring your environment for optimal performance, see Installing and Configuring Visual Studio Agents and Test and Build Controllers.
Once you have installed a test controller and one or more agents, you can then specify using a remote execution with the test controller in the test setting you use while you run your unit tests. Additionally, you can specify the data and diagnostic adapters to use with the role associated with the agents in the test setting. For more information, see Create Test Settings to Run Automated Tests from Visual Studio and Setting Up Machines and Collecting Diagnostic Information Using Test Settings.
If you have Visual Studio 2010 Ultimate, you can create load tests that include your unit tests to conduct stress and performance testing on your application. Load tests are ideal for use across multiple machines. For more information, see Testing Application Performance and Stress.
Use the following topics to learn how to set up and use test controllers and test agents:
Setting up your unit tests to use test controllers, test agents and test settings: You can run your unit tests across multiple machines using a test controller and agents.
Running unit tests as part of a test plan using an environment: You can also run unit tests as part of a test plan using an environment if you have Visual Studio Test Professional or Visual Studio Ultimate. The environment uses a test controller and test agents to run the test.