Export (0) Print
Expand All

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

After you create a test and run the test and it passes, you might want to proceed with more exhaustive performance testing, or run the test remotely on a regular basis, by using a test controller and test agents. For more information, see Setting Up Test Machines to Run Tests or Collect Data.

This topic is about using Visual Studio. However, if you have to plan your testing effort and run your tests as part of a test plan, you can use Microsoft Test Manager. For more information about how to use Microsoft Test Manager, see Defining Your Testing Effort Using Test Plans.

Note Note

Microsoft Test Manager is provided as part of Visual Studio Ultimate, Visual Studio Premium and Visual Studio Test Professional products.

Your tests can be run from the following windows in Visual Studio:

  • Test Explorer

  • Web Performance Test Editor

  • Load Test Editor

You use the same windows to run your test using a test controller and test agents, but first you must specify which test controller and test agents to use in the test settings.

Important note Important

Visual Studio 2012 includes different test project types for unit tests, coded UI tests, and for Web performance and load tests. By default, unit test projects and coded UI test projects no longer include .testsettings files to enhance performance. However, Web and load test project still include .testsettings files. If you open a Visual Studio 2010 test project that included any test types and that used a .testsettings file, it will retain the .testsettings file and continue to function. For more information, see Upgrading Tests from Earlier Versions of Visual Studio and Configure Test Project Creation.

To run unit tests, coded UI tests using a test controller and test agents

  1. Either open a Visual Studio 2010 solution that included a test project with a .testsettings file.

    -or-

    Add a test settings file to your solution containing either a unit test project or coded UI test project. For more information, see How to: Add a Test Settings File from Microsoft Visual Studio.

  2. In Solution Explorer, double-click the .testsettings file in the solution.

    The Test Settings dialog box is displayed. On the Roles page, you can specify the test controller that you want to use. For more information about selecting the test controller, roles, and test agents, see Specifying Test Settings for Visual Studio Tests.

  3. In Solution Explorer, right-click the .testsettings file in the solution and choose Active Load and Web Test Settings.

  4. Run your test using the Test Explorer or one of the run options under the Test menu.

    Your test runs on the remote controller and agents. To view tests that have run on a controller, use the Test Run window on the Test menu. For more information, see How to: Save and Open Test Results in Visual Studio.

To run a Web performance or load test using a test controller and test agents

  1. In Solution Explorer, double-click the .testsettings file in the solution.

    The Test Settings dialog box is displayed. On the Roles page, you can specify the test controller that you want to use. For more information about selecting the test controller, roles, and test agents, see Specifying Test Settings for Visual Studio Tests.

  2. In Solution Explorer, right-click the .testsettings file in the solution and choose Active Load and Web Test Settings.

  3. In the Web Performance Test Editor, choose Run Test from the toolbar.

    -or-

    In the Load Test Editor, choose Run Load Test from the toolbar.

    Your test runs on the remote controller and agents. To view tests that have run on a controller, use the Test Run window on the Test menu. For more information, see How to: Save and Open Test Results in Visual Studio.

Show:
© 2014 Microsoft