Web Stress Tests: Part 2

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:

http://localhost:3002/AddingMachine.svc
http://www.tenfingersfree.com/tff/AddingMachine.svc

To allow the Url to be configurable, I want into the Web Text Editor and pressed on the parameterize Web Servers button

image

After this dialog box:

image

The Web Test in the project auto-magically puts in a parameter into its Url property

image

I then updated the Url to include the service name

image

I then ran my web test and it failed.

image

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:

image

I then changed the extension to .csv and imported it into the web test via the Add Data Source button on the test

 

image

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:

image

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.

image

to

image

When I ran it, I got this:

image

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:

 

image

 

And I updated the string body like so:

image

And sure enough – different numbers thrown at my web service:

image

Wahoo!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: