Disabling caching of all dependent requests
In a previous blog post here: https://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
- Anonymous
June 06, 2008
PingBack from http://blogs.msdn.com/billbar/archive/2007/01/22/simulation-of-browser-caching-in-vsts-load-tests-and-web-tests.aspx - Anonymous
July 27, 2008
Visual Studio Team System for Testers Content Index for Web Tests and Load Tests Getting Started Online - Anonymous
July 27, 2008
I updated my Links to Info on Web and Load Tests post with new links. The last update was in March, so - Anonymous
May 11, 2012
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?