WebPagetest Forums
scripted test and caching - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: scripted test and caching (/showthread.php?tid=499)

scripted test and caching - endium - 01-22-2011 06:54 AM

I just realized that the numbers I was looking at for my scripted tests are probably wrong. My script basically does:
1. log data off
2. go to login page
3. enter login info and submit
4. log data on
5. go to page I'm interested in testing.

The problem is that when it gets to the login page, some of the resources are downloaded and cached, so when I turn log data back on and go to the real page I'm testing, only about half of the resources are downloaded, so it's not a true "first view" or uncached view.

Anyone know a good way of dealing with this? It would be nice if it would clear the cache (on first view runs only) when log data is turned on.

RE: scripted test and caching - pmeenan - 01-22-2011 10:19 AM

You could log in on your desktop, grab the session cookie and then have the script set the session cookie and navigate directly to the page.

Another option is to "combineSteps" instead of turning off the logging of the data and capture both pages.

Either way, if there is no way for your users to get to the page with an empty cache, testing with an empty cache doesn't seem appropriate.

RE: scripted test and caching - endium - 01-29-2011 05:55 AM

How do I use combineSteps? is it a new feature?
Yeah I do agree about the empty cache statement. The problem I have is that once you log in, you are automatically redirected to the homepage. So If I log in with logData turned off, then turn logData back on and say navigate to the homepage all of the resources are already in cache.

RE: scripted test and caching - pmeenan - 01-29-2011 05:59 AM

combineSteps was added around a month ago: http://www.webperformancecentral.com/wiki/WebPagetest/Scripting#combineSteps