VS2005 Load Test tips
I've been playing around with the performance test features of VS2005 and as I said in previous post: I really like it!
Some handy things that I figured out so far:
In VS2005 you can create webtests to test the pages of your website. A nice feature is that you can parameterize your test with context parameters. When you place you webtests in a load test you can add context parameters to your load test. If the parameters have the same names as in the webtest they overrule the values in the webtest. This is very useful, for instance when you want to change the host name for all your webtests.
You can create a plugin for your webtest by creating a class that derives from Microsoft.VisualStudio.TestTools.WebTesting.WebTestPlugin. This class has PreWebTest and PostWebTest events which you can use to set the parameters for your webtest. You can do the same trick for individual requests (WebRequestPlugin) and for load test (ILoadTestPlugin).
When you add a data source to a webtest, you can only select tables from that data source, there are no views available. To solve this, just edit the xml from the webtest and replace the table name with the name of the view you want to use. Works without a problem.
When you have added a data source to a webtest, you cannot easily change the connection string. It's greyed out in the properties box and for some reason you can't reach it through code. You can work around this by creating an UDL file for your data source. When you add the data source click on the "Advanced" button and add the UDL-file. When you use the UDL file in the data sources of all your webtests you can change them all at once by simply changing the connection in the file.
That's all so far, but more will follow.