Web Stress Tests: Part 2
February 12, 2013 Leave a comment
Now that I have a web performance test that is run repeatedly by the loadtest, I want to alter a couple of things. First, I want to change the Url from local host to another environment. In my case, WinHost. Here are the two Urls:
To allow the Url to be configurable, I want into the Web Text Editor and pressed on the parameterize Web Servers button
After this dialog box:
The Web Test in the project auto-magically puts in a parameter into its Url property
I then updated the Url to include the service name
I then ran my web test and it failed.
Apparently, I don’t need the service name in there. Taking it out gives me green.
I then swapped in the WinHost web server and I still get green
So the next thing I want to make dynamic are the input parameters. To that end, I created a notepad file like so:
I then changed the extension to .csv and imported it into the web test via the Add Data Source button on the test
It looks by default it assumes the 1st row is a column heading. The only thing I changed from the default is the access method property of the table to random:
I now have to get these values into the String Body. The MSDN documentation assumes that I will be altering input via the query parameter or the post parameters. I am not doing that, I need to update the String Body.
When I ran it, I got this:
I then binged into this article that showed me how my data source syntax was wrong and how to get the correct syntax generated for me:
And I updated the string body like so:
And sure enough – different numbers thrown at my web service: