Next action is, that I click on a text element on the webpage, identifying it via css-selectors, what works very fast usually.

But it nearly always happens, that at the start of the browser the navigating-action is veeeery slow, also the first click on to the element. Sometime both take more than 40 secs!

Some time later on the same system: I start the same test, without rebooting it or resetting or s.th. like this. And than - tadaa - everything works fine and fast. What took 40 secs now takes 5 secs ...

Does anyone have an idea what happens during this slow first tests? and how to avoid it?

Re: Slow start of webtests

I agree, most likely it has something to do with caching. Some recent versions of Chrome actually keep chrome running as a background process (an optional setting) to speed up browsing. It could be that the first run starts the Chrome process and each run afterwards uses the already started process.

Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.I love good food, good books, good friends, and good fun.

Re: Slow start of webtests

I agree, most likely it has something to do with caching. Some recent versions of Chrome actually keep chrome running as a background process (an optional setting) to speed up browsing. It could be that the first run starts the Chrome process and each run afterwards uses the already started process.

Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.I love good food, good books, good friends, and good fun.

Re: Slow start of webtests

Just my 2 cents worth. Yes, I also find that the first time I open the application it is slow. I use Visual Studio & ASP.net. so your experience may vary, but I'm sure the principles are the same. Running in debug mode from VS always compiles the site in IIS Express before you start. If you aren't debugging from VS or similar IDE, IIS creates and caches each page the first time someone opens it and then keeps it cached untill the app pool is stopped, the memory cap is reached or the recycle time is reached (You set these in IIS on the app pool properties) To decrease this load time, you can ensure that your web config inludes a debug="false" which removes some overhead and makes pages load faster. What makes much more of an impact is if you can publish the website precompiled. You can then set your tested app to run off localhost directly. This means IIS doesn't wait till you want to load the page to compile the website the first time. It won't eliminate that first cache though. You can map your pages in namemapping as http://*/Pages/MyPage so you don't end up having to remap everything each time you switch from testing to production servers