Web Page Test -
  Beyond the Basics

 @aaronpeters & @andydavies




 Velocity Europe
 Oct 2012

                              http://www.flickr.com/photos/jlakliche/2305075743
Thursday, 4 October 2012
http://www.flickr.com/photos/capcase/4970062156
Thursday, 4 October 2012
New stuff in the UI…

                                         http://www.flickr.com/photos/wlodi/3085152649
Thursday, 4 October 2012
Homepage > Advanced tab




Thursday, 4 October 2012
Disable JavaScript



                 Is JS indeed the big performance culprit?

                 Remove the JS from the page - no JS is loaded,
                 parsed or executed

                 Works very well!




Thursday, 4 October 2012
Disable Compatibility View



 IE only:

 Does the page load/render faster in Standards mode?

 <meta http-equiv="X-UA-Compatible" content="IE=8" />




Thursday, 4 October 2012
Capture Network Log (Chrome)


                           Returns big TXT file with JSON … then what?



                           “You probably don't want to use the
                           network log - it was added for the Chrome
                           team themselves to debug the browser :-)”
                                                            Pat Meenan



Thursday, 4 October 2012
Minimum test duration



               Make sure things that happen after onload are captured

               It works… kindof…

               Entered 45, test ran for 35 seconds!




Thursday, 4 October 2012
What happens when one of
           the UK’s largest ISPs has
             “routing problems”?
                           http://www.flickr.com/photos/alexmartin81/4548775140
Thursday, 4 October 2012
“Virgin Media Broadband ISP Users
  Affected by Website Routing Woes”
                                                                          ISP Review, May 26, 2012




      Customer jcmm33 said:
      “Same issue here as well, been like this all day. Sites like
      autotrader.co.uk don’t appear to be accessible, others like
      the telegraph.co.uk are waiting on other components to
      download (content from sites like cg-global.maxymiser.com,
      pixel.quantserve.com).”



                   http://www.ispreview.co.uk/index.php/2012/05/uk-virgin-media-broadband-isp-users-affected-by-website-routing-woes.html
Thursday, 4 October 2012
‘Blackhole’ Third-Party Requests




Thursday, 4 October 2012
Impact on The Telegraph…




        cg-global.maxymiser.com
              unreachable         http://bit.ly/Ncy7Rd
Thursday, 4 October 2012
The Problem Script



              _t._d.write(px ? '<img id="' + id + '"
             src="' + uri + '"/>' : '<scr' + 'ipt
             id="' + id + '" type="' + tp + '"
             charset="utf-8" src="' + uri + '"></
             scr' + 'ipt>')




   http://s.telegraph.co.uk/maxymiser/production/js/mmcore.js

Thursday, 4 October 2012
How much time do all those
     third-party components add?
                           http://www.flickr.com/photos/kindofindie/4099768084
Thursday, 4 October 2012
Specify Requests to be Blocked




Thursday, 4 October 2012
Is it quicker?




Thursday, 4 October 2012
First View (65 requests removed)

             6



          4.5



             3



          1.5



             0
                       Load Time    First Byte   Start Render   Doc Complete   Fully Loaded

                              Third-Party Requests Removed              Normal
Thursday, 4 October 2012
Repeat View (54 requests removed)

             6



          4.5



             3



          1.5



             0
                       Load Time    First Byte   Start Render   Doc Complete   Fully Loaded

                              Third-Party Requests Removed              Normal
Thursday, 4 October 2012
But… Numbers may not tell the Whole Story




Thursday, 4 October 2012
Scripting

                                   http://www.flickr.com/photos/symphoney/76513801
Thursday, 4 October 2012
Lots of possibilities!

     Great for simulating user-page interaction, multi-page testing
     and different 'conditions'


        Navigation/DOM interaction      submitForm
        End Conditions                  setDOMelement
        Request Manipulation            setDNS
        Misc                            combineSteps

  https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting
Thursday, 4 October 2012
Commands you’ll love
  navigate                 Navigate to next page, wait for it to complete

  logData                  Set to 0 to not record anything; 1 = record!

  setValue                 Sets value attribute of given DOM element to
                           provided value.
  submitForm               Triggers a submit event for the identified form.

  setDOMElement            Sets attribute of a DOM element that is required
                           for the next event to complete successfully.
  block                    Blocks individual requests from loading

  combineSteps             Causes multiple script steps to be combined into a
                           single "step" in the results
  setViewportSize          Changes size of visible browser window

  setDNS                   Allows for overriding the IP address for a host
                           name.

Thursday, 4 October 2012
Logging in

            1. Go to login page
            2. Enter credentials in a web form
            3. Submit the form

            Time how long the process takes




Thursday, 4 October 2012
The WPT Script



     combineSteps
     navigate   https://zakelijk.vodafone.nl
     setValue   name=username    xxxxxxxxxxxx
     setValue   name=password    xxxxxxxxxxxx
     submitForm name=login




Thursday, 4 October 2012
Result




Thursday, 4 October 2012
How to set the value of a <select> ?

  Can't use setValue

  Solution: do it with exec or execAndWait (Chrome & Firefox only)

  But: unusual waterfalls


  navigate http://www.turbobytes.com/signup/
  setValue name=name John
  setValue name=email Allspaw
  setValue name=url http://etsy.com
  exec document.getElementById(“plan”).value = “Pro”;
  submitForm name=contactFormCdn
Thursday, 4 October 2012
SetDOMElement (IE only)

    How long does it take for the element to appear?

      setDOMElement id=MyVodafone
      navigate http://www.vodafone.nl




Thursday, 4 October 2012
Responsive design / media queries

    Do those media queries work as expected?

    Case: loading two font files only on iPad/desktop



   setViewportSize 480 800
   navigate   http://www.turbobytes.com/products/optimizer/

   setViewportSize 800 800
   navigate   http://www.turbobytes.com/products/optimizer/



Thursday, 4 October 2012
Perf impact of font files is ...



           Chrome 800px           1.19 sec


           Chrome 480px           1.13 sec


           iPhone iOS 5.1 480px   1.28 sec *


                                               * wifi, not DSL
Thursday, 4 October 2012
Why did the test fail?

        Can be very hard to troubleshoot, especially for large
                              scripts!




Thursday, 4 October 2012
Look ma, there’s an API!
                                  http://www.flickr.com/photos/ianus/121448487
Thursday, 4 October 2012
Getting started…

        1. Submit request via POST or GET
        2. Poll for the test status (or use pingback)
        3. Fetch test results
        4. Fetch objects (charts, screenshots, ...)

        Want to use a public instance?

                 Need an API key
                 Tests will have low priority

Thursday, 4 October 2012
Create a Test



 …/runtest.php?f=xml&
               location=Europe&
               url=http://news.bbc.co.uk&
               k=myprivatekey



          https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis


Thursday, 4 October 2012
Create a Test - Response

 <response>
   <script/>
   <statusCode>200</statusCode>
   <statusText>Ok</statusText>
   <data>
     <testId>120928_0_G</testId>
     <ownerKey>4fa9bc3fdf1a54ba082a00b2a035879c231a5a1b</ownerKey>
     <xmlUrl>http://velocity.webpagetest.org/xmlResult/120928_0_G/</
 xmlUrl>
     <userUrl>http://velocity.webpagetest.org/result/120928_0_G/</
 userUrl>
     <summaryCSV>http://velocity.webpagetest.org/result/120928_0_G/
 page_data.csv</summaryCSV>
     <detailCSV>http://velocity.webpagetest.org/result/120928_0_G/
 requests.csv</detailCSV>
   </data>
 </response>
Thursday, 4 October 2012
Available Locations


    /getLocations.php


                              Idle   Total Being   High
  Location                                                 P1   P2   …   P8   P9
                             Testers Tests Tested Priority

  Europe_wptdriver:Chrome      2      0      0       0     0    0    …   0    0


  Europe_wptdriver:Firefox     2      0      0       0     0    0    …   0    0


  Europe                       2      0      0       0     0    0    …   0    0


Thursday, 4 October 2012
Check Test Status




                       …/testStatus.php?f=xml&
                                        test=test_id




Thursday, 4 October 2012
Check Test Status - Response

      <response>
        <script/>
        <statusCode>101</statusCode>
        <statusText>Test Pending</statusText>
        <data>
          <statusCode>101</statusCode>
          <statusText>Test Pending</statusText>
          <testId>120928_0_G</testId>
          <runs>1</runs>
          <fvonly>0</fvonly>
          <location>Europe</location>
        </data>
      </response>




Thursday, 4 October 2012
Get the Results

    …/xmlResult/test_id/
  <response>
    <script/>
    <statusCode>200</statusCode>
    <statusText>Ok</statusText>
    <data>
      <testId>120928_0_J</testId>
      <summary>http://velocity.webpagetest.org/result/120928_0_J/</summa
      <testUrl>http://news.bbc.co.uk</testUrl>
      <location>Europe</location>
      <connectivity>DSL</connectivity>
      <bwDown>1500</bwDown>
      <bwUp>384</bwUp>
      …
Thursday, 4 October 2012
So what can we build with the
               API?

                           http://www.flickr.com/photos/13965522@N00/3922937189
Thursday, 4 October 2012
Track how the web is built…

Thursday, 4 October 2012
Synthetic Monitoring




                                  wptmonitor.org
Thursday, 4 October 2012
With Waterfalls




Thursday, 4 October 2012
Continuous Integration

Thursday, 4 October 2012
Be a Web Page Test Hero!

                                   http://www.flickr.com/photos/brianauer/2197218356
Thursday, 4 October 2012
Aaron:                 Andy:

    @aaronpeters         @andydavies
    aaron@turbobytes.com andy@asteno.com




                                   http://www.flickr.com/photos/auntiep/5024494612
Thursday, 4 October 2012
‘Hidden’ API Gems

                                     http://www.flickr.com/photos/mariannedewit/3673379501
Thursday, 4 October 2012
Email when test completes




                           &notify=theboss@whitehouse.org




Thursday, 4 October 2012
Level of compression in images and video



                             &iq=90


       Specify jpeg compression level (30-10095) for
       screen shots and video capture




Thursday, 4 October 2012
Full resolution screenshots



                           &pngss=1



     1 = save a full-resolution version of fully loaded
     screen shot as a png



Thursday, 4 October 2012
JSON


                               &f=json


          By default you get XML, but it's a JSON world
          nowadays, right?!


        Can’t get full results in JSON yet, but it’s promised!

Thursday, 4 October 2012
console.log() output




Thursday, 4 October 2012
Time to <title>




           Not in UI, but ís in results from API: <titleTime>



                     Can also be found in “Raw Page data” CSV



Thursday, 4 October 2012

More Related Content

PDF
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
PDF
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
PPTX
Browser Wars Episode 1: The Phantom Menace
PDF
The Case for HTTP/2 - EpicFEL Sept 2015
PDF
Speed Matters!
PDF
The Case for HTTP/2
PDF
Mobile Web Performance - Getting and Staying Fast
PDF
What does the browser pre-loader do?
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Browser Wars Episode 1: The Phantom Menace
The Case for HTTP/2 - EpicFEL Sept 2015
Speed Matters!
The Case for HTTP/2
Mobile Web Performance - Getting and Staying Fast
What does the browser pre-loader do?

What's hot (19)

PDF
Speed is Essential for a Great Web Experience
PDF
Making Mobile Sites Faster
PDF
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
PDF
Mobile Web Speed Bumps
PDF
The web is too slow
KEY
Sniffing the Mobile Context
PDF
Progressive Enhancement 2.0 (Conference Agnostic)
PDF
Web Performance Workshop - Velocity London 2013
PPT
腾讯大讲堂09 如何建设高性能网站
PPTX
What is HTML 5?
PDF
Don't make me wait! or Building High-Performance Web Applications
KEY
Speed is Essential for a Great Web Experience
PDF
Making Mobile Sites Faster
PDF
Real World Web Standards
ODP
A Holistic View of Website Performance
PPT
The Need For Speed
KEY
HTML5 Video Player - HTML5 Dev Conf 2012
PPTX
High Performance Websites
PPT
Csdn Drdobbs Tenni Theurer Yahoo
Speed is Essential for a Great Web Experience
Making Mobile Sites Faster
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Mobile Web Speed Bumps
The web is too slow
Sniffing the Mobile Context
Progressive Enhancement 2.0 (Conference Agnostic)
Web Performance Workshop - Velocity London 2013
腾讯大讲堂09 如何建设高性能网站
What is HTML 5?
Don't make me wait! or Building High-Performance Web Applications
Speed is Essential for a Great Web Experience
Making Mobile Sites Faster
Real World Web Standards
A Holistic View of Website Performance
The Need For Speed
HTML5 Video Player - HTML5 Dev Conf 2012
High Performance Websites
Csdn Drdobbs Tenni Theurer Yahoo
Ad

Viewers also liked (20)

PDF
WebPagetest - Good, Bad & Ugly
PDF
WebPagetest Power Users - Velocity 2014
PPT
Velocity EU 2012 - Third party scripts and you
PPT
Scaling Front-End Performance - Velocity 2016
PPTX
Database
PPTX
Measuring the visual experience of website performance
PPT
Selecting and deploying automated optimization solutions
PDF
Web Performance mit dem Open Speed Monitor
PPTX
Machine Learning RUM - Velocity 2016
PPTX
TLS - 2016 Velocity Training
PPTX
Why Page Speed Isn't Enough - Tim Morrow - Velocity Europe 2012
PDF
Velocity EU 2013 What is the velocity of an unladen swallow?
PPTX
Data viz as_interface_makoto_inoue
PDF
Performance and Metrics at Lonely Planet
PDF
Bring the Noise
PDF
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
PDF
Integrating multiple CDNs at Etsy
PDF
Getting 100B Metrics to Disk
PDF
Be Mean to Your Code with Gauntlt and the Rugged Way // Velocity EU 2013 Work...
PPTX
Measuring performance - Velocity 2016 Training
WebPagetest - Good, Bad & Ugly
WebPagetest Power Users - Velocity 2014
Velocity EU 2012 - Third party scripts and you
Scaling Front-End Performance - Velocity 2016
Database
Measuring the visual experience of website performance
Selecting and deploying automated optimization solutions
Web Performance mit dem Open Speed Monitor
Machine Learning RUM - Velocity 2016
TLS - 2016 Velocity Training
Why Page Speed Isn't Enough - Tim Morrow - Velocity Europe 2012
Velocity EU 2013 What is the velocity of an unladen swallow?
Data viz as_interface_makoto_inoue
Performance and Metrics at Lonely Planet
Bring the Noise
MeasureWorks - Velocity Conference Europe 2012 - a Web Performance dashboard ...
Integrating multiple CDNs at Etsy
Getting 100B Metrics to Disk
Be Mean to Your Code with Gauntlt and the Rugged Way // Velocity EU 2013 Work...
Measuring performance - Velocity 2016 Training
Ad

Similar to Web Page Test - Beyond the Basics (20)

PDF
Análisis de ataques APT
PDF
Who Pulls the Strings?
PDF
Improving Front End Performance
PDF
Developing RESTful Web APIs with Python, Flask and MongoDB
PPTX
Html5 browser api_support
PPTX
Droidcon event 2015 Bangalore
PDF
Angrybirds Magento Cloud Deployment
PDF
Why and How to Use Virtual DOM
PPTX
Ogma_Web Services Testing
PDF
Building performance into the new yahoo homepage presentation
PPTX
A Deep Dive into the W3C WebDriver Specification
PDF
Performance on the Yahoo! Homepage
PDF
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
PPTX
Google chrome
PPTX
Code sharing at MediaEval
PDF
Adobe AIR Overview
PPT
selenium.ppt
PPT
selenium.ppt
PDF
Optimising Web Application Frontend
PPT
selenium.ppt
Análisis de ataques APT
Who Pulls the Strings?
Improving Front End Performance
Developing RESTful Web APIs with Python, Flask and MongoDB
Html5 browser api_support
Droidcon event 2015 Bangalore
Angrybirds Magento Cloud Deployment
Why and How to Use Virtual DOM
Ogma_Web Services Testing
Building performance into the new yahoo homepage presentation
A Deep Dive into the W3C WebDriver Specification
Performance on the Yahoo! Homepage
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Google chrome
Code sharing at MediaEval
Adobe AIR Overview
selenium.ppt
selenium.ppt
Optimising Web Application Frontend
selenium.ppt

More from Andy Davies (18)

PDF
Fast Fashion… How Missguided revolutionised their approach to site performanc...
PDF
Fast Fashion… How Missguided revolutionised their approach to site performanc...
PDF
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
PDF
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
PDF
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
PDF
Selling Performance - Bristol WebPerf Meetup 2017-07-20
PDF
Speed: The 'Forgotten' Conversion Factor
PDF
Building an Appier Web - London Web Standards - Nov 2016
PDF
Building an Appier Web - Velocity Amsterdam 2016
PDF
The Case for HTTP/2 - GreeceJS - June 2016
PDF
Building an Appier Web - May 2016
PDF
The Fast, The Slow and The Unconverted - Emerce Conversion 2016
PDF
Making Mobile Sites Faster
PDF
Speed matters, So why is your site so slow?
PDF
HTTP2 is Here!
PDF
Http/2 - What's it all about?
PDF
EdgeConf - Page Load Performance Opening Talk
PDF
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?
Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
Selling Performance - Bristol WebPerf Meetup 2017-07-20
Speed: The 'Forgotten' Conversion Factor
Building an Appier Web - London Web Standards - Nov 2016
Building an Appier Web - Velocity Amsterdam 2016
The Case for HTTP/2 - GreeceJS - June 2016
Building an Appier Web - May 2016
The Fast, The Slow and The Unconverted - Emerce Conversion 2016
Making Mobile Sites Faster
Speed matters, So why is your site so slow?
HTTP2 is Here!
Http/2 - What's it all about?
EdgeConf - Page Load Performance Opening Talk
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?

Recently uploaded (20)

PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
SaaS reusability assessment using machine learning techniques
PDF
The AI Revolution in Customer Service - 2025
PDF
Examining Bias in AI Generated News Content.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Decision Optimization - From Theory to Practice
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PPTX
How to use fields_get method in Odoo 18
PPTX
Information-Technology-in-Human-Society.pptx
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
PDF
Human Computer Interaction Miterm Lesson
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
CEH Module 2 Footprinting CEH V13, concepts
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
SaaS reusability assessment using machine learning techniques
The AI Revolution in Customer Service - 2025
Examining Bias in AI Generated News Content.pdf
Lung cancer patients survival prediction using outlier detection and optimize...
Decision Optimization - From Theory to Practice
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Rapid Prototyping: A lecture on prototyping techniques for interface design
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
How to use fields_get method in Odoo 18
Information-Technology-in-Human-Society.pptx
Presentation - Principles of Instructional Design.pptx
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
Human Computer Interaction Miterm Lesson
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Build Real-Time ML Apps with Python, Feast & NoSQL
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
CEH Module 2 Footprinting CEH V13, concepts

Web Page Test - Beyond the Basics

  • 1. Web Page Test - Beyond the Basics @aaronpeters & @andydavies Velocity Europe Oct 2012 http://www.flickr.com/photos/jlakliche/2305075743 Thursday, 4 October 2012
  • 3. New stuff in the UI… http://www.flickr.com/photos/wlodi/3085152649 Thursday, 4 October 2012
  • 4. Homepage > Advanced tab Thursday, 4 October 2012
  • 5. Disable JavaScript Is JS indeed the big performance culprit? Remove the JS from the page - no JS is loaded, parsed or executed Works very well! Thursday, 4 October 2012
  • 6. Disable Compatibility View IE only: Does the page load/render faster in Standards mode? <meta http-equiv="X-UA-Compatible" content="IE=8" /> Thursday, 4 October 2012
  • 7. Capture Network Log (Chrome) Returns big TXT file with JSON … then what? “You probably don't want to use the network log - it was added for the Chrome team themselves to debug the browser :-)” Pat Meenan Thursday, 4 October 2012
  • 8. Minimum test duration Make sure things that happen after onload are captured It works… kindof… Entered 45, test ran for 35 seconds! Thursday, 4 October 2012
  • 9. What happens when one of the UK’s largest ISPs has “routing problems”? http://www.flickr.com/photos/alexmartin81/4548775140 Thursday, 4 October 2012
  • 10. “Virgin Media Broadband ISP Users Affected by Website Routing Woes” ISP Review, May 26, 2012 Customer jcmm33 said: “Same issue here as well, been like this all day. Sites like autotrader.co.uk don’t appear to be accessible, others like the telegraph.co.uk are waiting on other components to download (content from sites like cg-global.maxymiser.com, pixel.quantserve.com).” http://www.ispreview.co.uk/index.php/2012/05/uk-virgin-media-broadband-isp-users-affected-by-website-routing-woes.html Thursday, 4 October 2012
  • 12. Impact on The Telegraph… cg-global.maxymiser.com unreachable http://bit.ly/Ncy7Rd Thursday, 4 October 2012
  • 13. The Problem Script _t._d.write(px ? '<img id="' + id + '" src="' + uri + '"/>' : '<scr' + 'ipt id="' + id + '" type="' + tp + '" charset="utf-8" src="' + uri + '"></ scr' + 'ipt>') http://s.telegraph.co.uk/maxymiser/production/js/mmcore.js Thursday, 4 October 2012
  • 14. How much time do all those third-party components add? http://www.flickr.com/photos/kindofindie/4099768084 Thursday, 4 October 2012
  • 15. Specify Requests to be Blocked Thursday, 4 October 2012
  • 16. Is it quicker? Thursday, 4 October 2012
  • 17. First View (65 requests removed) 6 4.5 3 1.5 0 Load Time First Byte Start Render Doc Complete Fully Loaded Third-Party Requests Removed Normal Thursday, 4 October 2012
  • 18. Repeat View (54 requests removed) 6 4.5 3 1.5 0 Load Time First Byte Start Render Doc Complete Fully Loaded Third-Party Requests Removed Normal Thursday, 4 October 2012
  • 19. But… Numbers may not tell the Whole Story Thursday, 4 October 2012
  • 20. Scripting http://www.flickr.com/photos/symphoney/76513801 Thursday, 4 October 2012
  • 21. Lots of possibilities! Great for simulating user-page interaction, multi-page testing and different 'conditions' Navigation/DOM interaction submitForm End Conditions setDOMelement Request Manipulation setDNS Misc combineSteps https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting Thursday, 4 October 2012
  • 22. Commands you’ll love navigate Navigate to next page, wait for it to complete logData Set to 0 to not record anything; 1 = record! setValue Sets value attribute of given DOM element to provided value. submitForm Triggers a submit event for the identified form. setDOMElement Sets attribute of a DOM element that is required for the next event to complete successfully. block Blocks individual requests from loading combineSteps Causes multiple script steps to be combined into a single "step" in the results setViewportSize Changes size of visible browser window setDNS Allows for overriding the IP address for a host name. Thursday, 4 October 2012
  • 23. Logging in 1. Go to login page 2. Enter credentials in a web form 3. Submit the form Time how long the process takes Thursday, 4 October 2012
  • 24. The WPT Script combineSteps navigate https://zakelijk.vodafone.nl setValue name=username xxxxxxxxxxxx setValue name=password xxxxxxxxxxxx submitForm name=login Thursday, 4 October 2012
  • 26. How to set the value of a <select> ? Can't use setValue Solution: do it with exec or execAndWait (Chrome & Firefox only) But: unusual waterfalls navigate http://www.turbobytes.com/signup/ setValue name=name John setValue name=email Allspaw setValue name=url http://etsy.com exec document.getElementById(“plan”).value = “Pro”; submitForm name=contactFormCdn Thursday, 4 October 2012
  • 27. SetDOMElement (IE only) How long does it take for the element to appear? setDOMElement id=MyVodafone navigate http://www.vodafone.nl Thursday, 4 October 2012
  • 28. Responsive design / media queries Do those media queries work as expected? Case: loading two font files only on iPad/desktop setViewportSize 480 800 navigate http://www.turbobytes.com/products/optimizer/ setViewportSize 800 800 navigate http://www.turbobytes.com/products/optimizer/ Thursday, 4 October 2012
  • 29. Perf impact of font files is ... Chrome 800px 1.19 sec Chrome 480px 1.13 sec iPhone iOS 5.1 480px 1.28 sec * * wifi, not DSL Thursday, 4 October 2012
  • 30. Why did the test fail? Can be very hard to troubleshoot, especially for large scripts! Thursday, 4 October 2012
  • 31. Look ma, there’s an API! http://www.flickr.com/photos/ianus/121448487 Thursday, 4 October 2012
  • 32. Getting started… 1. Submit request via POST or GET 2. Poll for the test status (or use pingback) 3. Fetch test results 4. Fetch objects (charts, screenshots, ...) Want to use a public instance? Need an API key Tests will have low priority Thursday, 4 October 2012
  • 33. Create a Test …/runtest.php?f=xml& location=Europe& url=http://news.bbc.co.uk& k=myprivatekey https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis Thursday, 4 October 2012
  • 34. Create a Test - Response <response> <script/> <statusCode>200</statusCode> <statusText>Ok</statusText> <data> <testId>120928_0_G</testId> <ownerKey>4fa9bc3fdf1a54ba082a00b2a035879c231a5a1b</ownerKey> <xmlUrl>http://velocity.webpagetest.org/xmlResult/120928_0_G/</ xmlUrl> <userUrl>http://velocity.webpagetest.org/result/120928_0_G/</ userUrl> <summaryCSV>http://velocity.webpagetest.org/result/120928_0_G/ page_data.csv</summaryCSV> <detailCSV>http://velocity.webpagetest.org/result/120928_0_G/ requests.csv</detailCSV> </data> </response> Thursday, 4 October 2012
  • 35. Available Locations /getLocations.php Idle Total Being High Location P1 P2 … P8 P9 Testers Tests Tested Priority Europe_wptdriver:Chrome 2 0 0 0 0 0 … 0 0 Europe_wptdriver:Firefox 2 0 0 0 0 0 … 0 0 Europe 2 0 0 0 0 0 … 0 0 Thursday, 4 October 2012
  • 36. Check Test Status …/testStatus.php?f=xml& test=test_id Thursday, 4 October 2012
  • 37. Check Test Status - Response <response> <script/> <statusCode>101</statusCode> <statusText>Test Pending</statusText> <data> <statusCode>101</statusCode> <statusText>Test Pending</statusText> <testId>120928_0_G</testId> <runs>1</runs> <fvonly>0</fvonly> <location>Europe</location> </data> </response> Thursday, 4 October 2012
  • 38. Get the Results …/xmlResult/test_id/ <response> <script/> <statusCode>200</statusCode> <statusText>Ok</statusText> <data> <testId>120928_0_J</testId> <summary>http://velocity.webpagetest.org/result/120928_0_J/</summa <testUrl>http://news.bbc.co.uk</testUrl> <location>Europe</location> <connectivity>DSL</connectivity> <bwDown>1500</bwDown> <bwUp>384</bwUp> … Thursday, 4 October 2012
  • 39. So what can we build with the API? http://www.flickr.com/photos/13965522@N00/3922937189 Thursday, 4 October 2012
  • 40. Track how the web is built… Thursday, 4 October 2012
  • 41. Synthetic Monitoring wptmonitor.org Thursday, 4 October 2012
  • 44. Be a Web Page Test Hero! http://www.flickr.com/photos/brianauer/2197218356 Thursday, 4 October 2012
  • 45. Aaron: Andy: @aaronpeters @andydavies [email protected] [email protected] http://www.flickr.com/photos/auntiep/5024494612 Thursday, 4 October 2012
  • 46. ‘Hidden’ API Gems http://www.flickr.com/photos/mariannedewit/3673379501 Thursday, 4 October 2012
  • 47. Email when test completes &[email protected] Thursday, 4 October 2012
  • 48. Level of compression in images and video &iq=90 Specify jpeg compression level (30-10095) for screen shots and video capture Thursday, 4 October 2012
  • 49. Full resolution screenshots &pngss=1 1 = save a full-resolution version of fully loaded screen shot as a png Thursday, 4 October 2012
  • 50. JSON &f=json By default you get XML, but it's a JSON world nowadays, right?! Can’t get full results in JSON yet, but it’s promised! Thursday, 4 October 2012
  • 52. Time to <title> Not in UI, but ís in results from API: <titleTime> Can also be found in “Raw Page data” CSV Thursday, 4 October 2012