Welcome to MSDN Blogs Sign in | Join | Help

Event ordering in Web Tests

Web tests have a number of extensibility points before and after a request. What order do they run in?

The hooks are:

WebTestPlugin.PreRequest

WebTestRequestPlugin.PreRequest

ExtractionRule.Extract

ValidationRule.Validate

Here is a sequence diagram that shows what order things fire:

ResultsSequence

 

There is no guaranteed order of firing for WebTestPlugin.PreRequest and RequestPlugin.PreRequest. Also if you have >1 Extraction or Validation rule on a request there is no guaranteed order they are run in.

Also note that Pre and Post request events do not fire by default for dependents. You can hook the PostRequest call on a top level request and iterate through dependents to wire up event handlers if you need that functionality.

Ed.

Published Thursday, August 28, 2008 4:49 PM by edglas

Comments

# VSTS Links - 08/29/2008

Willy-Peter Schaub on TFS 2008 Service Pack 1 - Caution with database backups! Jason Barile on Why "Get...

Friday, August 29, 2008 12:45 PM by Team System News

# Les événements d'un test web

Vous vous êtes déjà demandé quel était le cycle de vie d’un test web ? Par exemple : Quand étaient bindées

Monday, September 01, 2008 6:05 AM by Etienne Margraff

# re: Event ordering in Web Tests

Thanks for the great chart. Question on the StartRequest/RequestComplete loop in there.

What is it about % Time in Rules that the higher the time spent in rules (we have a number of regular expression extraction rules) that would cause the average response time for requests to be higher as that % goes up? Is it slowing down the rig so timestamp gathering or StartRequestReturn/SendRepsonseChunk are being delayed?

It doesn't look to me like pre or post request extraction rules are inside of the request loop, so why would time spent in those rules make response time longer?

Thanks for your feedback

Thursday, January 15, 2009 5:09 PM by jborneman
Anonymous comments are disabled
 
Page view tracker