Parameterizing web load tests

by admin 3/2/2010 8:55:00 PM

You’ve been asked to make sure that the Client Search screen will stand up under load, because it will be most used screen in the application.  You set up a test user, and then run the Web Performance Test wizard in visual Studio 2010 to record the test.  You make a new test project, save it in TFS and add a new Web Performance Test.  the browser launches, and you log in as your test user.  You do a few client searches representative of the use of the system and log off.

Next, you create a Load Test.  The wizard launches, and you prescribe a 50 user test over a half hour.  You save the test, launch it and go to lunch.

When you come back, there are 23,856 errors.

What happened?  Oh, that’s right, one user can’t log into this system more than once – it was an early requirement.  Oh!  How am I going to do this then?  Do I have to record 50 Web Performance Tests? No.  You can parameterize the login.

Making a data source

Start with a CSV file of usernames and passwords.  You can make it in NotePad or Excel.

image

Next, we will need a datasource that points here.  Open your webest and click on the Add Data Source icon up in the test’s button bar.

image

You can select CSV file as the source of the data.

image

Pick the excel file you created and you’ll see the sample data.

image

The new data source will show up as one of the data sources for this test.  Probably shoulda named it something better, huh?

image

Binding the fields

The next major step is to bind the data to the fiends in question.  This is insanely easy.  find the step where you enter the data.  In my case, it was the Login.aspx page.  Open the Form Post Parameters folder and find the parameters for the login and password.  In this app, they are pretty easy to find.

image

Then follow these steps to get to the next image:

Open the properties panel with F4

Click on the fiend in your application that has the user name.  Mine is txtUser_Name

Click on the Value parameter in the properties panel.

Click the dropdown arrow.

Open the data source in the treeview.

Open the testdata table (or whatever you named it)

image

Click on UserName and there you go.  Teat field is now bound to the value.

 image

This will work for any form

Remember, this isn’t just for login.  Actually, I am making a mashup of performance testing and training, adding the training data to the system using the performance test for the New Item pages.  Load testing isn’t just for performance anymore!

Family Game Night should be back

by Admin 3/2/2010 8:49:00 AM

I just spent the evening playing board games with my four year old son.  For a lot of people this would be an exercise in boredom, but it shouldn't be.  Teaching games is something that is very similar to teaching the kind of thinking that makes software design work.  It’s important, logical thinking.

Board games with young children doesn’t have to be limited to chutes and ladders and Candyland – random games with zero strategy.  Kids need to LEARN strategy.  The only way they will learn is to be led, hand in hand, though the process of making game decisions.  For instance, tonight Adam and I played Living Labyrinth . He can’t quite read the cards, and he has a hard time making decisions about how to use the cards.  But how else will he learn?

Living_Labyrinth_5in[1]

We played open hand, and I walked him through every move.  I reminded him to play his card first then move, and point blank told him what moves to make and why.  It wasn’t competitive, but it was a blast, and Adam learned a ton.  I’m betting that next time we play he’ll remember the cards and be able to make some decisions about his card use.

After that, we played a much less sophisticated game, Guess Who? This game is a deduction game similar to the old logic puzzles with the grid that we all did in the puzzle magazines.  The kicker here – Adam beat me five out of five games.  I can’t explain it, unless it is just that he is a good guesser.  We play fair and square, no help, no hints, and he has to sound out the name of the mystery person for his final guess.  Beat my pants off.

Next time I am introducing him to Kids of Catan .

SIEDLER1

 

This remarkable game will not only be a great rule learning adventure, but the pieces are cool and we can make up our own games – another important skill.

Plus, I can have him play against Jeff Blankenburg next year at CodeMash.

Tags:

Personal | Rants

About the author

Bill Sempf Bill Sempf
Author of C# All In One for Dummies (among other things)

E-mail me Send mail

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Pages

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Sign in