Using WebPageTest

Book description

Learn basic and advanced uses of WebPagetest, the performance measurement tool for optimizing websites. This practical guide shows users new to this tool how run tests and interpret results, and helps experienced users gain a better and more thorough understanding of hidden features in WebPagetest that make testing easier.

Written by WebPagetest power users and performance experts, this book will help web developers and frontend engineers solve the problem of slow sites. Topics include:

  • Basic test setup—shows beginners how to get meaningful results
  • Advanced test setup—provides another level of technical depth by explaining features not thoroughly documented at webpagetest.org
  • Analysis of results—helps you understand of how to interpret test results
  • Private instance setup—teaches power users the intricacies of the webpagetest private instance and how it works
  • API and external tools—provides a detailed reference for the API and demonstrates tools already using the API to extend WebPagetest

Publisher resources

View/Submit Errata

Table of contents

  1. Foreword
  2. Preface
    1. Who Should Read This Book
    2. A Word on Web Performance Today
    3. Navigating This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. Acknowledgments
  3. I. Basic Use Cases
  4. 1. How Fast Is My Page?
    1. Measure What Matters
    2. Synthetic Versus RUM
  5. 2. What’s Slowing Down My Page?
    1. Running a Simple Test
    2. Reading a Waterfall
      1. Waterfall Slope
      2. Connection View
      3. Common Anti-Patterns
    3. WebPageTest Grades
      1. First-Byte Time
      2. Keep-Alive Enabled
      3. Compress Transfer
      4. Compress Images
      5. Progressive JPEGs
      6. Cache Static Content
      7. Effective Use of CDNs
  6. 3. Cache Optimization
    1. Enabling Repeat View
    2. Analyzing Cachability
    3. Heuristic Caching
  7. 4. Comparing Tests
    1. Perceived Performance
    2. Capture Video
    3. Filmstrip and Video
      1. Speed Index
    4. Summary of Part I
  8. II. Intermediate Use Cases
  9. 5. Simulating Real Users
    1. Identifying Demographics
      1. Popular Pages
      2. Device and Browser
      3. Geographic Location
      4. Connection Speed
  10. 6. Mobile Testing
    1. Desktop Emulation
    2. Traffic Shaping
    3. Native Devices
  11. 7. Scripting Preconditions
    1. Flow View
      1. logData and navigate
    2. Authentication
      1. HTTP Basic Authentication
      2. DOM Manipulation
      3. Setting Cookies
  12. 8. SPOF Testing
    1. Black-Hole Rerouting
      1. setDns
      2. SPOF Tab
    2. Blocking Requests
  13. III. Advanced Use Cases
  14. 9. WebPageTest API
    1. Getting Started
      1. Requesting a Key
    2. Running Tests
      1. Simple Example Test
      2. Advanced Example Test
    3. Reading the Results
      1. Polling Test Results
      2. Pingback Test Results
    4. Reading Beyond Results
  15. 10. Continuous Integration
    1. Node.js Wrapper
      1. Installing the WebPageTest Node.js Wrapper
      2. Choosing Your WebPageTest Server
      3. Specifying the API Key
      4. Running the Tests and Reading the Results
      5. RESTful Proxy
    2. Asserting Metrics from Test Results
      1. JSON Test Specs
      2. Defining Assertion Comparison
      3. Setting Default Operations and Labels
      4. Available Output Text Template Tags
      5. Available Assertion Operations
      6. Overriding Labels
      7. Specifying Test Reporter
      8. Test Specs Examples
    3. Jenkins Integration
      1. Configuring Jenkins
    4. Travis-CI Integration
      1. Configuring Travis-CI
  16. 11. Private Instances
    1. How Does WebPageTest Work?
    2. Using the Preconfigured AWS AMI
      1. Create an AWS User with Relevant Permissions
      2. Configure and Launch the AWS Instance
    3. Creating Your Own Local Installation
      1. Desktop Test Agents
      2. Mobile Test Agents
      3. Install Agent
      4. Add iOS Devices
      5. Bandwidth Shaping
      6. Remote Test Agents
    4. Private-Instance-Only Features
      1. Bulk Test
      2. Custom Metrics
    5. Day-to-Day Management
      1. Monitoring Queues and Test Agents
      2. Archiving Old Tests
      3. Updating an Instance
    6. Troubleshooting
    7. Contributing Changes to WebPageTest
  17. A. API Input/Output Reference Guide
    1. Examples of Test Results
      1. When Test Is Not Complete
      2. When Test Is Complete
    2. Details of Test Results
    3. Details of Requests In Test Results
    4. API
      1. Locations
      2. Test
      3. Status
      4. Cancel
      5. Results
      6. Testers
      7. HAR
      8. Chrome Developer Tools Timeline
      9. Test History
      10. Response Body
      11. Waterfall
      12. Create Video
      13. Get Gzip Content
      14. Get Thumbnail
  18. Index

Product information

  • Title: Using WebPageTest
  • Author(s): Rick Viscomi, Andy Davies, Marcel Duran
  • Release date: October 2015
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491902806