Your SlideShare is downloading. ×
0
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Aaron Peters aug2012
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Aaron Peters aug2012

369

Published on

WebPagetest - Good, Bad & Ugly

WebPagetest - Good, Bad & Ugly

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
369
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Paget e s t: W eWebPagetest APIlyUsing the b he Ug he Ba d&TThe Good, T
  • 2. 1 First … some basic tips
  • 3. Understand the test environmentWindows version? DNS resolver?Hardware specs (RAM, processor)?
  • 4. Run a large number of tests
  • 5. Collect RUM data too !
  • 6. Summary statistics hide insight Mean: ~1400 ms Median: ~1100 ms
  • 7. Look at individual tests Normal Ouch!
  • 8. 2 New stuff in the WPT ui
  • 9. Homepage > Advanced tab
  • 10. Capture Network Log (Chrome)Returns big TXT file with JSON … then what?Pat: “You probably dont want to use thenetwork log - it was added for the Chrometeam themselves to debug the browser :-)”
  • 11. Minimum test durationIt works, kindof ... Example (minTestDur=45)
  • 12. 3 WPT API introduction
  • 13. Getting startedGet an API key from Pat (required)Know your requests will have low prio /getLocations.phpBasic process:1. Submit request via POST or GET2. Poll for the test status (or use pingback)3. Fetch test results4. Fetch objects (charts, screen shots, ...)
  • 14. Submitting requestsSend a POST or GET tohttp://www.webpagetest.org/runtest.phpurl is only required parameterDefaults: Dulles DSL, 1 run, first & repeatview, public, no videoOverview of parameters
  • 15. ResultsExample XMLIt has it all, incl.1. PageSpeed version & results2. Page <title>3. Links to pages/files for everything in UI4. Video frame URLs & Speed Index score !
  • 16. DocumentationOfficial API documentationPython lib for ad-hoc batch processingBatch processing command line tool
  • 17. 4 Scripting
  • 18. Lots of possibilities!https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scriptingNavigation/DOM interaction (submitForm)End Conditions (setDOMelement)Request Manipulation (setDNS)Misc (combineSteps)Great for simulating user-page interaction,multi-page testing and different conditions
  • 19. Example scriptslogData 0navigate http://www.gamesgames.com/logData 1navigate http://www.gamesgames.com/search.html? search=bloons+4SetDNSName cdn.domain.com www.domain.comoverrideHost cdn.domain.com www.domain.comnavigate www.domain.com
  • 20. Commands youll likely useCommand Descriptionnavigate Navigate to next page, wait for it to completelogData Set to 0 to not record anything; 1 = record!setValue Sets the value attribute of the given DOM element to the provided value.submitForm Triggers a submit event for the identified form.setDOMElement Sets the attribute of a DOM element that is required for the next event to complete successfully.block Blocks individual requests from loadingcombineSteps Causes multiple script steps to be combined into a single "step" in the resultssetViewportSize Changes size of visible browser windowfirefoxPref Allows you to specify arbitrary preferences that will be configured before launching the browser. Eg. firefoxPref network.http.pipelining falsesetDNS Allows for overriding the IP address for a host name.
  • 21. Why did the test fail?Can be very hard to troubleshoot, esp. onlarge scripts
  • 22. 5 WPT – hidden gems
  • 23. &notify=theboss@whitehouse.orge-mail address to notify with the test results
  • 24. &iq=90Specify a jpeg compression level (30-10095)for the screen shots and video capture iq=default iq=90 Video!
  • 25. &pngss=1Set to 1 to save a full-resolution version ofthe fully loaded screen shot as a png Normal JPG Big PNG24
  • 26. &f=jsonFormat. Set to "xml" to request an XMLresponse instead of a redirect ("json" is alsoprovisionally supported)
  • 27. &plr=50Packet loss rate - percent of packets to drop(used when specifying a custom connectivityprofile) plr=0 plr=50 No diff ! Location specific issue?
  • 28. console.log() outputCan be found on the screen shots page ... Example
  • 29. Time to TitleNot in UI, but ís in results from API: <titleTime>Can also be found in “Raw Page data” CSV Example
  • 30. 6 Closing remarks
  • 31. WPT can act … surprising
  • 32. The documentation may not help out
  • 33. It may drive you mad
  • 34. Dont give up easily
  • 35. Put some effort in!
  • 36. Be the Success Kid!

×