Share via


Running Unit Tests on Multiple Machines Using a Test Controller and Test Agents

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic applies Topic applies Topic applies Topic does not apply

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 Test Agents and Test 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.

Remote machines using controller and agents

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.

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. 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.

Test Controller

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.

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 unit test.

For more information, see Managing Test Controllers and Test Agents.

Visual Studio Agents 2010 Information

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 Test Agents and Test Controllers.

Using the Test Controller and Test Agent with Unit Tests

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.

Conducting Stress and Performance Testing on Unit Tests

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.

Tasks

Use the following topics to learn how to set up and use test controllers and test agents:

Key Tasks

Associated Topics

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.

See Also

Tasks

How to: Run a Test Using Test Controllers and Test Agents

Walkthrough: Using a Test Controller and Test Agents in a Load Test

Concepts

Creating and Running Unit Tests for Existing Code

Testing Application Performance and Stress