Monday, May 09, 2011

Running Visual Studio Load Test

If you are creating a load test in Visual Studio, the load test result will be saved to a SQL Server database.

There is a one time setup which you need to do in order to save the result into the database.

1) You need to create the database schema in a SQL Server database. To do this, run the following sql script in SQL Server to create the database:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\loadtestresultsrepository.sql

Note : Use 'Program Files' if you are on 32bit. Use 'Program Files (x86)' if you are on 64bit.
Use 'Microsoft Visual Studio 10.0' if you are using Visual Studio 2010. Use 'Microsoft Visual Studio 9.0' if you are using Visual Studio 2008.

The default database name is 'LoadTest2010' (for VS 2010) and 'LoadTest' (for VS 2008).

2) You need to configure the database connection string in Visual Studio so that the load test know where to save the test result. To do this,
go to menu Test -> Manage Test Controller, then click on the browse button to enter you connection string.

You only need to do these steps once. The same database will be used for all load tests for all projects.

If you do not do the above steps, you won't be able to see result after you run the load test.



Post a Comment

<< Home