I am working on one of the php web site, the home page consists of a background image and on the top of the image there is a button.

Now my problem is whenever I am doing automation for this web site, the home page was loading very slowly due to the image but it is not happening when I am opening the home page manually. Please let me know what the possible reasons are for the home page opening very slowly.

  • Most likely it is due to the clearing of the cache during automation whereas in the manual runs the image is already stored in your cache and doesn't have to be downloaded. What is the filesize of the image?
    – Paul Muir
    Jun 2, 2015 at 11:09
  • In Automation also there will be a cache ??
    – QAMember
    Jun 2, 2015 at 11:18
  • Depending on what you are using it will likely clear the cache out between each run resulting in it needing to completely re-download the image. It is highly unlikely you would want it to run through the cache since it could potentially run using older cached Javascript files and such. A way to test this theory is on a manual run, clear out your brower's cache and see how long it takes to load.
    – Paul Muir
    Jun 2, 2015 at 11:20
  • Thanks for your answer @ PaulDonny , I have tried in incognito window by manually .It is taking equal amount of time to automation loading time
    – QAMember
    Jun 2, 2015 at 12:24

1 Answer 1


Your issue appears to be in the cache based on the comments.

When an automation suite kicks off it will typically clear all of the cache and treat it like the very first time that browser has ever been run. This will cause any scripts or images that are large and have longer loading times to be re-downloaded/processed/whatever.

This is really good for automation because it leads to clean, fresh runs that don't have stored data that corrupt the run. The problem though is that it will slow down the application drastically.

There are ways to disable this piece within most automation tools, though I would personally recommend against doing this unless you specifically wanted the test(s) to contain cached data.

Ultimately, I would recommend reaching out to the parties responsible for this and see if the uncached load times are acceptable. If not, file a defect.

  • By using deleteAllCookies() gives any changes in the performanance ? bocz I use to run the test case for multiple times. Is it good to use deleteAllCookies() method ?
    – QAMember
    Jun 2, 2015 at 12:39
  • delateAllCookies should not though I am not familiar with how the function works. Typically when I need a test case to run multiple times I set it up as a Data Driven test case so that it completely re-instantiates the test as a whole with each run and not have to worry about such issues.
    – Paul Muir
    Jun 2, 2015 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.