How to: Add Virtual User License Keys for Load Testing Using the Command-Line
This topic applies to:
Visual Studio Ultimate
Visual Studio Premium
Visual Studio Professional
Visual Studio Express
Visual Studio Ultimate lets you use up to 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 2010 to obtain the required licensing. You can purchase Visual Studio Load Test Virtual User Pack 2010 where you purchased Visual Studio Ultimate.
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 2010. 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.
Another benefit of installing Visual Studio Load Test Virtual User Pack 2010 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.
The Visual Studio 2010 Load Test Feature Pack provides active Microsoft Visual Studio Ultimate 2010 with MSDN subscribers a unique Visual Studio Load Test Virtual User Pack 2010 license key to generate unlimited virtual users.
To download the feature pack, which is available for MSDN Subscribers only, visit MSDN Subscribers Downloads. For more information about the feature pack, see Microsoft Visual Studio 2010 Load Test Feature Pack.
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 2010 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 2010 license keys, as shown in the following steps.
To add virtual user license keys for load tests from the command line
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 2010, point to Visual Studio Tools, and then right-click Visual Studio 2010 Command Prompt and select Run as Administrator.
Type one of the two following commands:
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
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.
VSTestConfig Licenses /AddKey:AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.
The command line is the only way to enter a license key if the machine does not have a test controller installed.
(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.
To add virtual user licenses, you can also open the Microsoft Visual Studio Test Controller 2010 Configuration Tool from the command line by using TestControllerConfigUI.exe.