We recommend using Visual Studio 2017

How to: Add Virtual User License Keys for Load Testing Using the Command-Line

[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 does not apply Topic does not apply Topic does not apply

Visual Studio Ultimate lets you use a maximum of 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 to obtain the required licensing. You can purchase Visual Studio Load Test Virtual User Pack where you purchased Visual Studio Ultimate.

Note Note

You are not required to use test controllers and test agents on a single machine to install additional virtual users by using Visual Studio Load Test Virtual User Pack. For more information, see Configuring Test Controllers and Test Agents for Load Testing.

For more information, see Managing Your Virtual User Licenses for Load Testing with a Test Controller.

Tip Tip

Another benefit of installing Visual Studio Load Test Virtual User Pack is that the license packs use multiprocessor architecture. Virtual user license packs allow the machine on which they are installed to use more than one processor. Otherwise, the machine is restricted to using only one core.

Visual Studio Ultimate can use a test controller and agents on a group of machines to run tests remotely and concurrently to generate additional stress on your load test. This group of machines consists of a single test controller and one or more test agents. For more information about how to use Visual Studio Load Test Virtual User Pack for both a single test machine and in a distributed environment, see Configuring Test Controllers and Test Agents for Load Testing and Create Test Settings to Run Automated Tests from Visual Studio

You can use either the TestControlerConfig or VSTestConfig command-line tools to install Visual Studio Load Test Virtual User Pack license keys, as shown in the following steps.

To add virtual user license keys for load tests from the command line

  1. You must run the Visual Studio Command Prompt as an administrator. To do this, click Start, point to All Programs, point to Microsoft Visual Studio 11, point to Visual Studio Tools, and then right-click Developer Command Prompt and select Run as Administrator.

  2. Type one of the two following commands:

    1. TestControlerConfig:

      TestControllerConfig Licenses /AddKey:AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.

      If you are adding a volume license key, a /count option is available. For example, use the following command to add the same key five times:

      TestControllerConfig Licenses /AddKey:AAAAA-BBBBB-CCCCC-DDDDD-EEEEE /Count:5

      Note Note

      The /count option works only with volume license keys. When you add retail keys, the /count option will give you an error to indicate that the key can be added only one time.

    2. VSTestConfig:

      VSTestConfig Licenses /AddKey:AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.

      Note Note

      The command line is the only way to enter a license key if the machine does not have a test controller installed.

  3. (Optional) If you intend to run your load test by using a test controller and test agents, verify that you have selected the correct test setting. For more information, see How to: Select a Load Test Run Setting to Use from the Command-Line and How to: Apply Test Settings from Microsoft Visual Studio.

    Tip Tip

    To add virtual user licenses, you can also open the Microsoft Visual Studio Test Controller Configuration Tool from the command line by using TestControllerConfigUI.exe.