Bill Barnett's blog

Visual Studio Team System - Web and Load Testing

Disabling caching of all dependent requests

 In a previous blog post here: http://blogs.msdn.com/billbar/archive/2007/01/22/simulation-of-browser-caching-in-vsts-load-tests-and-web-tests.aspx, I described the behavior of caching with VSTS 2005.   

 With VSTS 2008, the default caching behavior is the same.   However, with VSTS 2008, if you want completely disabling caching of all dependent requests and always fetch them, you can so by adding the following WebTestPlugin to your Web test:

    public class WebTestPlugin_DisableDependentCaching : WebTestPlugin

    {

        public override void PostRequest(object sender, PostRequestEventArgs e)

        {

            foreach (WebTestRequest dependentRequest in e.Request.DependentRequests)

            {

                dependentRequest.Cache = false;

            }

        }

    }

 

 

Published Friday, June 06, 2008 8:56 PM by billbar@microsoft.com

Comments

 

Bill Barnett's blog : Simulation of browser caching in VSTS load tests and Web tests said:

June 6, 2008 4:05 PM
 

Ed Glas's blog on VSTS load testing said:

Visual Studio Team System for Testers Content Index for Web Tests and Load Tests Getting Started Online

July 27, 2008 2:19 PM
 

Ed Glas's blog on VSTS load testing said:

I updated my Links to Info on Web and Load Tests post with new links. The last update was in March, so

July 27, 2008 2:31 PM
Anonymous comments are disabled

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker