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;


            }


        }


    }


 


 

Comments (4)

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

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

  3. Unknown says:

    When would I need this? If I set "Percentage of New Users" to 100 on load test then it  would give me the same behavior right?