Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
207 views
by The go-to Tester (262 points)
retagged by
Please provide me a tool/suggestion to check the slowest page of a website. Apart from performance testing, how to test the page loading in an extreme level. ex : page time taken before clean cache and after clean cache

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

I use, 

app.telemetry Page Speed Monitor

https://addons.mozilla.org/en-US/firefox/addon/apptelemetry/

That works with Firefox. Also, page load timing is specific to the browser URL.

 

I have even tried using selenium webdriver. Usually selenium gives control back to you, when your page is loaded. So you can try below code to get page load time for each browser.

long startTime = System.currentTimeMillis();
 
driver.navigate().to("http://mayurshah.in");
 
long loadedTime = System.currentTimeMillis();
long diff= loadedTime - startTime; 
System.out.println("Total Time for page load - "+diff); 
 
Usually webdriver opens browser with clear cookies and clean session. So, that will help you get page load time when cookies are cleared.
In case of, some element on the page are loaded using JavaScript, you can use explicit wait to wait for that element.
 
long startTime = System.currentTimeMillis();
 
driver.navigate().to("http://mayurshah.in");
 
WebDriverWait wait = new WebDriverWait();
 
wait.until(ExpectedConditions.presenceOfElementLocated(By.id("myDynamicElement")));
 
long loadedTime = System.currentTimeMillis();
long diff= loadedTime - startTime; 
System.out.println("Total Time for page load - "+diff); 
 
 
Hope that answered your question.

 


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...