hi, all
For some reason, I have to clean cache during every time running web test cases, does any one know how to do that
please help me .
Thanks very much.
hi, all
For some reason, I have to clean cache during every time running web test cases, does any one know how to do that
please help me .
Thanks very much.
how to clear the cache in a web test?
derf1934
I'll try to clarify (and hope that my attempt doesn't actually muddy the waters) ...
What I meant was that within a single web test session, if the same URL is requested more than once (for example, if the same image or style sheet is embedded on more than one page), requests to these URLs may still be cached.
One reason that there may be run to run variability is VSTS web tests attempt to mimic the caching behavior of Internet Explorer (when cache is set to the "Automatically" mode) which includes a heuristic for determining when to cache vs. when to send a "conditional request" for requests that don't return explict caching directives. This Internet Explorer heuristic is described in an MSDN article at:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnwebgen/html/ie_introfiddler2.asp frame=true
Notice that the last part of the heuristic is somewhat timing dependent since it takes into account the age of the item in the cache:
"The cached resource has been conditionally requested at least once within the most recent 25 percent of its overall age in the cache."
Because this is timing dependent, if the timing changes from one run of the load test to the next for any reason (including the randomness of think times for example), there could easily be minor changes in the percentage of requests cached.
I'm not sure if this helps you or not,
Bill
mixministermike
hi Bill,
Can you clarify what you mean by
"but does NOT disable caching within a single web test session"
I am having trouble getting a consistent baseline using a loadtest. The volume of cached requests is constantly moving around which then alters the number of requests you can get through. I want to be able to run a load test with 1 user for 20min and be able to say "we should get through 27000 requests with 40000 cached requests".
I have found by ensuring all the requests in the webtest are run through in the first 20 min run the second 20min gets a lot more requests as there is far more in the cache from the previous run. I would have thought though that once all the requests (child requests) are cached the runs should be fairly similar but I am seeing differences of up to 10% between runs. Runs 2-4 are similar and then the requests start going down again (which I assume the app is running out of memory or swapping). We need to be able to note a 5% decrease under load as even this could be catastrophic for our site.
I am doing this through the UI with the Percentage of New Users = 100 and allowing 1 min of warm up time.
Thanks
Paul
Roberto B
Aryam
The only control that you have over the caching behavior is the property named "Percentage of New Users" (which you can find on the property sheet when you select one of the Scenario nodes in the load test editor tree).
With "Percentage of New Users" set to 100, each new web test iteration that is run in a load test starts out with a clear cache which effectively disables caching across web test iterations for a virtual user, but does NOT disable caching within a single web test session. With "Percentage of New Users" set to 0, new web test iterations reuse the cache from a previous web test iteration for the same virtual user, so caching is enabled across web test iterations. By running the load test twice (once with Percentage of New Users at 100, and once with a value of 0), you should be able to see the effects of caching.
ZSTRCZ
Hi, bill
Because I want to get the PLT1 and PLT2 data when running load test cases, so I want to know how to enable and disable the cache in test cases.
Can you tell me the way to do that
Thanks very much.
Seth Maffey
The cache simulation in a web test is automatic, and is only kept in memory, so you shouldn't need to clean up the cache between web tests. Are you running the web tests in a load test or just running individual web tests What problem or files are you seeing that you need to clean up