3 out of 6 rated this helpful - Rate this topic

How to: Create a Load Test Results Repository Using SQL

Updated: August 2010

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic appliesTopic does not applyTopic does not applyTopic does not apply

Results of load tests are stored in a SQL database. The SQL database is called the Load Test Results Store. It can be local, typically using SQL Express, or remote, using any version of SQL. After the database schema is created, you can save the load test results to the database.

One option is to create the database tables on a local server that is running SQL Express. You only have to run the scripts one time for your local Load Test Results Store to be the global setting for all load tests.

For a controller, setup creates a default local instance of SQL Express and the Load Test Results Store and configures it for use by the controller. For any setup that does not use a remote machine, the database is created on the first run of a load test. You need to configure a separate and different Results Store if you want to use a database on a more powerful SQL Server. You can later mine the data mined by additional users. For more information, see Distributing Load Tests Across Multiple Test Machines Using Test Controllers and Test Agents.

To set up a computer running SQL

  1. Open a Visual Studio Command prompt. Type the following text:

    On a 32-bit version of Windows running Visual Studio 2010 Ultimate type: cd n:\Program Files\Microsoft Visual Studio 10\Common7\IDE

    -or-

    On a 64-bit version of Windows running Visual Studio 2010 Ultimate type: cd n:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE

  2. In that folder, type the following text:

    • SQL Express: SQLCMD /S localhost\sqlexpress /i loadtestresultsrepository.sql

    • SQL: You can install the database to any existing SQL server. For example, if you had a SQL server named ContosoServer1 you would use the following command:

      SQLCMD /S ContosoServer1 -i loadtestresultsrepository.sql

    Caution noteCaution

    The parameters are case sensitive. You must type uppercase S and lowercase i.

    You might also need to specify a user name and password so that you can connect to ContosoServer1. If so, you would use the following command:

    SQLCMD /S ContosoServer1 -U <user name> -P <password> -i loadtestresultsrepository.sql

    Caution noteCaution

    The parameters are case sensitive. You must type uppercase S, U, and P, and lowercase i.

  3. On the Test menu, click Manage Test Controllers. The Manage Test Controllers dialog box is displayed.

  4. In the Load Test Results Connection String, click the browse button (…) to display the Connection Properties dialog box.

    NoteNote

    If you change the connection string for a controller, then you must select the controller.

  5. In Server Name, type localhost\sqlexpress or the name of the server that you used in step 2 such as ContosoServer1.

  6. Under Log on to the server, choose Use Windows Authentication.

  7. Under Connect to a database, choose Select or enter a database name. Select LoadTest from the drop-down list box.

  8. Click OK.

  9. Click Close in the Administer Test Controller dialog box.

Date

History

Reason

August 2010

Added path for 64-bit version of Visual Studio 2010 Ultimate.

Customer feedback.

December 2010

Clarified command lines for SQL Express and SQL.

Customer feedback.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Instructions not up to date for VS SP1
In the Test menu, I don't have "Administer Test Controllers", but I have "Manage Test Controllers"
2010 Load Test Results Repository on SQL 2000 is not supported
2010 Load Test Results Repository on SQL 2000 is not supported

The documenation above is not accurate with respect to "It can be local, typically using SQL Express, or remote,using any version of SQL."  The script calls for certain objects that don't exist in SQL 2000 and it will error out when run.  This also may confuse those who were in TAP or using the public beta since SQL 2k was supported.

Eric Crouthamel