Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Visual Studio Load Testing, and monitoring machines not in my domain

I'm wishing to use Visual Studio Load Tests to perform some load testing.

I was hoping to be able to use the counter monitoring that the Load Test provide in order to collect performance statistics from the web server I'm loading.

However there only seems to be support for connecting to machines you wish to monitor via your domain credentials. From http://msdn.microsoft.com/en-us/library/ms182594.aspx, section "To specify computers to monitor with counter sets during load test run"

On each server that you monitor, you must have sufficient user permissions to run performance monitors. Otherwise, errors are generated.

There seems to be no way to provide specific credentials to use to connect to machines you wish to monitor. As the web server I wish to monitor does not belong to a domain, I don't see any way to monitor it using VS Load Tests.

Is there some way to monitor it using VS Load Tests that I've missed?

like image 885
SamStephens Avatar asked Feb 06 '12 22:02

SamStephens


2 Answers

There seems to be no way to provide specific credentials to use to connect to machines you wish to monitor

There is a way to do this. On Windows 7 it is called Credential Manager and you can access it either by searching for Manage Network Passwords on your Start Menu or via Control Panel > User Accounts. On older versions it was called Stored User Names and Passwords, also accessible via Control Panel > User Accounts.

In a nutshell, it allows you to specify alternative credentials for remote systems. Once you have set up credentials, it works completely invisibly and automatically for remote connection attempts from any application applications that support it, including Visual Studio collecting remote Perfmon data.

NOTE that you have to set up the credentials on the account that actually runs your load tests. If you are only running local load tests with no Controller then that's your own account. However if you run a Controller/Agent rig, the Controller may be configured to run under a service account (i.e. check the account running "Visual Studio Test Controller" service or QTController.exe). You have to login as that account and add the credentials.

like image 139
agentnega Avatar answered Sep 30 '22 23:09

agentnega


I've found the following which is working for me. I'm just running the net use commands by hand because I don't want the user name and password in source control.

To get this working you will need to manually open an IPC channel to the SQL and IIS machines with an account that has permissions in that domain. This allows the account running the load tests to "piggyback" across that IPC channel.

i have found this site to be a great help getting this going myself. http://blogs.catapultsystems.com/tlingenfelder/archive/2009/06/18/performance-counters-timeouts-and-load-testing-with-visual-studio-2008.aspx

what you can do is create a small bat file and set it up to run in the .testrunconfig file as a setup script.

net use \\SQLSERVER\IPC$ password1 /user:DOMAIN1\USER /persistent:yes 
net use \\IISSERVER\IPC$ password2 /user:DOMAIN2\USER /persistent:yes
like image 20
SamStephens Avatar answered Sep 30 '22 23:09

SamStephens