"Fun" with Visual Studio 2010 Performance Testing

As I am sure you can tell from the title of this post, we have been having nothing but issues using Visual Studio 2010 on the current solution we are performance testing.  While this is going to be a bitch session, with possible solutions and workarounds we have found, these issues are in no way limited to only Visual Studio.

As one of my coworkers said, “I’m learning that every load testing solution is shit.”  Sadly, the more you work with them, and the more complex the solution, the quicker you come to this realization.  This becomes even more clear as we are expected to bounce around between different performance testing solutions, being pseudo-masters on a smattering of them.  While it is expensive, outsourcing to someone like Keynote may possibly be the best answer (I have used and work with these guys before, and they are great).

Without further ado, let me breakdown the issues we’ve been having so far.  I really, really, really hope that this list doesn’t continue to grow as we are already running out of time.

  1. Scripting.  We had a bear of a time with scripting our specific website.  No matter what we did, there was no way to get it to actually work by scripting it with Visual Studio.  The website in general is fairly basic, but is loaded up with a ton of Telerik controls per page (don’t even get me started!).  Each stage of our workflow has a bunch of these controls and then a final submit button that moves it into the next stage.  Scripting with VS always failed on the subsequent AJAX postbacks because it was not correctly parameterizing the values (wasn’t extracting some).  However, this only happened when we scripted all the way to through the final submit.  If we scripted, but did not include the final submit button, the script worked correctly and did not have any of the errors.  Since the Telerik controls have so many forms in the post fixing the parameterization issue by hand would’ve taken hours per page (each workflow has 7 pages and there are 17 workflows).  And we couldn’t figure out how to simply wire up the final submit to the working rest of the script.  No matter what we did we’d always get errors on the final submit POST.  The solution?  Use Fiddler and save the sessions as a webtest.  This has a lot of downsides, such as no parameterization at all and the scripts break pretty easily once any code changes.  Fun.
  2. Load Testing Workflows with NTLM Authentication. The next issue we ran into was with wiring up the individual workflow pieces into one large workflow.  The breakdown was that each part of the workflow needed to be handled by a different user, and the users would log in via NTLM.  The most obvious way to do this was to have a webtest call another webtest.  However, we weren’t able to get that to work.  The next way was to use an ordered test, but that didn’t give us reports into individual page loads.  The final way was to create a load scenario that runs scripts in a specific order, but that would require a lot of controllers among other things.  In our desperation, I even created an MSDN question.  The solution?  We created a plugin that cleared the user’s cookies (even though it should’ve been running as a unique user 100% of the time), and also accessed a server redirect page to force the authentication request.  Thankfully we didn’t go down the road of rolling our own queuing system as that would’ve been painful.
  3. Lack of Test Logs after a Run. Now that we were actually able to run tests, we were having all sorts of issues with results.  Sadly, we weren’t able to actually view the results because VS wasn’t saving them.  Again, in desperation I created another MSDN question.  With VS2010, you are supposed to be able to capture all the results of failed tests, and the select “Test Log” to see what the results are.  Unfortunately, when we run tests it sometimes shows up, and sometimes not.  However, for anything longer than a 15 minute run, ours were 60 mins, we never received any results.  We also get links to the “Test Log”, but they don’t do anything when you click.  The solution?  Yeah, as of now we don’t have one other than running two controllers: one running the full load and another one running individual tests to hopefully see a similar error message.

I can only hope that there are no other issues.  Hope, hope, hope!

 

Easy XPath Queries

A guy in the office was asking about a better way to do XPath queries.  Well, since everyone uses Notepad++ (right?!), you can use the following plugins.

XML Tools

Libraries

Restart NotePad++ and checkout the Plugin menu.  Under XML Tools there is now an evaluate XPath Expressions.  Very handy!

Large File Transfers

One of the problems I know I’ve had in the past, especially at work, is transferring large files between two places.  Usually this happens with virtual machines, and developers needing access to the originals.  There has never been a good way around this.  I’ve tried various things: FTP, Dropbox-esque cloud sites, sneaker net, etc.

However, I stumbled upon a new site that is doing things a bit differently.  Basically their system just maximizes the route between two endpoints and then you send the file directly.  Obviously this isn’t a good choice for upload once, consume a lot items, but if you just need to get things sent once, it could work pretty well.

The site is called Sendoid, and they have both a web and desktop application.  Looks pretty basic and worthwhile.  I haven’t tried it yet, but it could also work well for distributed backups (house my files on someone else’s computer like my parent’s).

Email After 3 Weeks

The main reason why I dislike taking such long vacations.

Nothing like 2.8k of unread work email, 457 of which are just in my inbox.  Fun!

 

Published
Categorized as work

MSDN Downloader Link

I hate when I go to MSDN and am downloading a large ISO only for something to happen and the download manager closes.  I don’t have a shortcut on my desktop to it, so it is a pain to find.

In case this happens to you, here is the link load it back up.

“C:WindowsDownloaded Program FilesTransferMgr.exe”

 

SQL Dashboard 2005 for SQL 2008

  1. Install the Dashboard by running the msi, which will attempt to install to a default location of Program FilesMicrosoft SQL Server90ToolsPerformanceDashboard. Save the files to the Program FilesMicrosoft SQL Server100ToolsPerformanceDashboard directory instead
  2. Replace performance_dashboard_main.rdl in the PerformanceDashboard folder with the updated version attached below
  3. Open Management Studio and connect to the server and run the SETUP.SQL script (once for each SQL instance you want to monitor) located below and in attachment
  4. From Object Explorer select the server, right mouse click and choose Reports – Custom Reports and browse to find the PERFORMANCE_DASHBOARD_MAIN.RDL file. This report is the only report intended to be directly loaded from SSMS; all other reports are accessed as a drill through off of the main report

2008 Dashboard Zip

IIS Log Analysis

Some good things to use when trying to do analysis on IIS logs:

  • TXTCollector – This will make all your individual IIS log files into one large file.
  • Log Parser – Write SQL queries against your IIS Log files
  • Visual Log Parser – No command line (but sometimes a pain in the ass to install)!
  • Log Parser Lizard – Visual Log Parser doesn’t want to install anymore, so a new tool it is!
  • Log Parser Studio – Free from MS!

Some common Log Parser queries:

select cs-uri-stem as url,
cs-uri-query, cs-method,
 count(cs-uri-stem) as pagecount,
 sum(time-taken) as total-processing-time,
 avg(time-taken) as average,
 Max(time-taken) as Maximum
from <logfile>
group by cs-uri-stem,
 cs-uri-query,
 cs-method
order by average desc

 

select cs-uri-stem as url,
 cs-method,
 count(cs-uri-stem) as pagecount,
 sum(time-taken) as total-processing-time,
 avg(time-taken) as average
from <logfile>
where cs-uri-stem like '%.aspx'
group by cs-uri-stem,
 cs-method
order by pagecount desc

 

select top 500 cs-uri-stem as url,
 cs-uri-query,
 count(cs-uri-stem) as pagecount,
 sum(time-taken) as total-processing-time,
 avg(time-taken) as average
from <logfile>
where cs-uri-stem like '%.aspx'
group by cs-uri-stem,
 cs-uri-query
order by pagecount desc

 

select cs-uri-stem as url,
 cs-method,
 count(cs-uri-stem) as pagecount,
 sum(time-taken) as total-processing-time,
 avg(time-taken) as average,
 avg(sc-bytes),
 max(sc-bytes)
from <logfile>
where cs-uri-stem like '%.aspx'
group by cs-uri-stem,
 cs-method
order by pagecount desc

UpdateI’m just adding more queries I frequently use, and fixing the formatting.

select quantize(time-taken,5000) as 5seconds,
 count(cs-uri-stem) as hits,
 cs-uri-stem as url
from <logfile>
group by url, quantize(time-taken,5000)
order by quantize(time-taken,5000)

 

select
 quantize(time,3600) as dayHour,
 count(cs-uri-stem) as hits,
 avg(time-taken) as averageTime,
 cs-uri-stem as url
from <logfile>
where url like '%.svc'
group by url,
 dayHour
order by dayHour
select
TO_LOCALTIME(QUANTIZE(TO_TIMESTAMP(date, time), 3600)) AS dayHour,
count(cs-uri-stem) as hits
from <logfile>
where cs-uri-stem like '%/page.aspx'
group by dayHour
order by dayHour Asc

Quickly Test DB Connection String

I’m throwing this up here because I consistently forget the file type extension to do this.  If you want to test a DB Connection String, create a new document and rename it something with the .udl extension.  Double click on it and fill in the relevant information.

Oh, and as an aside, the theme should look a bit different/better here shortly.  This WP install is pretty screwed up right now, so I will be reinstalling it at some point.

Published
Categorized as work

Work Item Migration from TFS 2008 to 2010

During a migration from TFS2008 to TFS2010 I am currently working on, one of the things we needed to migrate is Work Items.  We have three customized work items, which we need to migrate from one server to another.

The downside, is that when I am running witadmin.exe, I get the error:

TF212018: Work item tracking schema validation error: TF26177: The field System.RelatedLinkCount cannot be renamed from ‘Related Link Count’ to ‘RelatedLinkCount’.

This is happening because the xml has changed between TFS2008 and TFS2010.  Talk about a pain.  However, the fix is fairly painless.  All you need to do is rename RelatedLinkCount in your xml that you’re trying to import to “Related Link Count”.

More than likely you will receive multiple errors that are similar.  Simply rename them all, and it should import.  The ones I constantly ran into:

  • RelatedLinkCount – Related Link Count
  • IterationID – Iteration ID
  • ExternalLinkCount – External Link Count
  • HyperLinkCount – Hyperlink Count
  • AttachedFileCount – Attached File Count
  • AreaID – Area ID

As an aside, always test with the /v, validate, switch to ensure everything in the xml is valid.

Published
Categorized as work

Iteration and Path Import/Export

There is a great little utility I found for importing and exporting Iteration and Path. It also makes it way easier to bulk edit items via notepad and then import. Works with TFS 2005, 2008, and 2010. Yay!

Published
Categorized as work