Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Testing the Web Performance using Selenium

Bharathan
February 16, 2017

Testing the Web Performance using Selenium

Author: Anto Sukesh
This ppt was given as talk in Thoughtworks VodQA Session - Feb 16

Bharathan

February 16, 2017
Tweet

More Decks by Bharathan

Other Decks in Programming

Transcript

  1. Web Performance Testing Web performance refers to the speed in

    which web pages are downloaded and displayed on the user's web browser. Web Performance Testing is not Load Testing.
  2. Facts ➔ According to Amazon, 100ms increase in latency =

    1% reduction in sales ➔ WALMART found 1 second improvement in page load time increased their conversion by 2%. ➔ Google uses page speed as a ranking signal which means that the faster pages are ranked higher.
  3. Approach 1 : Timings • Set the self timing inside

    the code before and after the web page load.
  4. Approach 2 : Web Timings • Embedding the Javascript code

    in selenium to get the page load timings. Disadvantage is that we cannot get the per item timings and actual navigation timings.
  5. Approach 2 : Web Timings • Another use case can

    be getting individual element load time. Writing code by identifying element through selenium and getting the element load time.
  6. Approach 2 : Web Timings • Chrome and IE also

    supports the calculating of page load performance according to the screen paint.
  7. Approach 3 : Browser Extensions • Complete page rendering time.

    Javascript time CPU usage time HAR file Extensions Supported Firebug Net Panel + Net Export Chrome developer tools Dyna trace for IE or firefox
  8. Approach 4 : Using Proxy Proxy server is a server

    that acts as an intermediary for requests from clients seeking resources from other servers. Advantages of using proxy Header changes URL Rewrite Black listing/White listing URLS Limit Bandwidth
  9. Approach 5 : Wire HTTP Capture Listen and capture Packet

    trace MAC sudo tcpdump -i en0 -n -s 0 -w ~/Desktop/network.pcap WINDOWS Winpcap -i 0 -n -s 0 -w network.pcap
  10. Some online tools to explore • WebPageTest.org HAR Viewer Page

    speed test extension from google Speed Index