Presentation by @aaronpeters at Dutch Web Performance Meetup on August 22 2012.
The presentation covers new stuff in WPT UI, the WPT API, scripting and hidden gems. Awesome tool, but also room for improvement.
10. Capture Network Log (Chrome)
Returns big TXT file with JSON … then what?
Pat: “You probably don't want to use the
network log - it was added for the Chrome
team themselves to debug the browser :-)”
13. Getting started
Get an API key from Pat (required)
Know your requests will have low prio /getLocations.php
Basic process:
1. Submit request via POST or GET
2. Poll for the test status (or use pingback)
3. Fetch test results
4. Fetch objects (charts, screen shots, ...)
14. Submitting requests
Send a POST or GET to
http://www.webpagetest.org/runtest.php
url is only required parameter
Defaults: Dulles DSL, 1 run, first & repeat
view, public, no video
Overview of parameters
15. Results
Example XML
It has it all, incl.
1. PageSpeed version & results
2. Page <title>
3. Links to pages/files for everything in UI
4. Video frame URLs & Speed Index score !
20. Commands you'll likely use
Command Description
navigate Navigate to next page, wait for it to complete
logData 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 loading
combineSteps Causes multiple script steps to be combined into a single
"step" in the results
setViewportSize Changes size of visible browser window
firefoxPref Allows you to specify arbitrary preferences that will be
configured before launching the browser. Eg.
firefoxPref network.http.pipelining false
setDNS Allows for overriding the IP address for a host name.
21. Why did the test fail?
Can be very hard to troubleshoot, esp. on
large scripts
24. &iq=90
Specify a jpeg compression level (30-10095)
for the screen shots and video capture
iq=default
iq=90
Video!
25. &pngss=1
Set to 1 to save a full-resolution version of
the fully loaded screen shot as a png
Normal JPG
Big PNG24
26. &f=json
Format. Set to "xml" to request an XML
response instead of a redirect ("json" is also
provisionally supported)
27. &plr=50
Packet loss rate - percent of packets to drop
(used when specifying a custom connectivity
profile)
plr=0
plr=50
No diff !
Location
specific
issue?