Showing posts with label load test. Show all posts
Showing posts with label load test. Show all posts

Friday, August 17, 2012

VS 2010 Load Test - Save and View Test Logs

In VS 2010 Load Tests, the failed test logs are saved by default.
This is because the setting Save Log on Test Failure is set to True

However, if you want to save the logs even for the passed tests, you can do that by changing the setting Save Log Frequency for Completed Tests

Note that the maximum number of test logs saved in both cases is controlled by the setting Maximum Test Logs

You wont be able to see these logs while the load test is running. However, once the load test is complete, you can see these logs by going to Tables->Test Details

Thursday, July 26, 2012

VS 2010 Load Test - Percentile values for Transaction Response Time

In VS 2010, when the load test run is complete, you can view the percentile values for transactions. Remember that these are percentile values and not percentage values.

Consider there are 10 requests where request1 to request9 took 1sec and request10 took 5 sec.
So the percentage of requests which took less than or equal to 1 sec is  9*100/10 = 90 percent

However, to calculate the percentile, we have to arrange the values in a sorted manner i.e.
1,1,1,1,1,1,1,1,1,5

Now, to calclulate the percentile, we calculate the rank by using the formula:
n = (P*N)/100 + 1/2 where P is the percentile and N is the number of items.

So the rank for 90th percentile will be:
n = (90*10)/100 + 1/2 = 9.5
We round off the rank and pickup the the nth element i.e. the 10th element i.e. 5

Thus the 90th percentile value is 5 sec but 90 percentage of transactions took 1 sec.

You can view Percentile values of 90%, 95% and 99% for each transaction in Tables->Transactions


Monday, August 29, 2011

VS 2010 Load Test - The ConnectionString property has not been initialized

Have you seen the below error while running a load test in VS 2010
---------------------------
Microsoft Visual Studio
---------------------------
Could not read result repository: The ConnectionString property has not been initialized..


Will display the runtime result instead of the repository result.
---------------------------
OK
---------------------------

 The reason is that you have selected "None" in the "Storage Type" property of the Run Settings. Instead select "Database" and you should not see this error.

Monday, April 18, 2011

VS 2010 - Create Load Test Repository

One day I found that my Load Test Reporsitory is missing and hence I was not able to run the load tests.
The load tests were failing with the error:
---------------------------
Microsoft Visual Studio
---------------------------
Error occurred running test. The load test results database could not be opened.  Check that the load test results database specified by the connect string for your test controller (or local machine) specifies a database that contains the load test schema and that is currently available.  For more information, see the Visual Studio help topic 'About the Load Test Results Store'.   The connection error was: An error occurred while attempting to create the load test results repository schema: Cannot find the object 'LoadTestTestCaseSummary', because it does not exist or you do not have permission.
---------------------------
OK  
---------------------------

To resolve this issue, I followed the below steps:
1) Open VS command prompt in elevated mode (Run As Administrator)
2) Run the command "cd C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE"
3) Run the command "SQLCMD /S localhost\sqlexpress /i loadtestresultsrepository.sql "