When setting up Visual Studio to run load tests you might have noticed a nasty warning message such as this one:

"The connection string for the database has not been set. To store your results in a database for post-run analysis, set the connections string to a valid load test results store."

image

 

This happens because Visual Studio is trying to store your test results in a database store. This way you can load it later (in case you close your current open Visual Studio application). This post will show you how you can configure Visual Studio to stop bugging you.

We will get rid of that message by actually listening to it and configuring a database for Visual Studio to use. You will need access to an SQL database server and access to the Management Studio - you will need to run a SQL Query.

1. Open SQL Management Studio

image

2. Find the SQL Query that will create your database store

This file is C:\Program Files\Visual Studio 9\Common7\IDE\loadtestresultsrepository.sql
This is the directory for Visual Studio 2008, but this file should be there for other versions as well.

image

3. Run the SQL Query file

Hopefully you will get the "Command(s) completed successfully" message

image

 

4. Link Visual Studio to this new database

Open Visual Studio.

Go to Test > Administer Test Controllers...

image

And enter in the LoadTest database name in the dialog that appears

image

 

Et Voila! No more error message!