Skip to Main Content
Using WebPageTest
book

Using WebPageTest

by Rick Viscomi, Andy Davies, Marcel Duran
October 2015
Beginner content levelBeginner
214 pages
4h 30m
English
O'Reilly Media, Inc.
Content preview from Using WebPageTest

Chapter 10. Continuous Integration

In software engineering, continuous integration (CI) can be defined as the practice of merging all developer working copies with a shared repository several times a day. It performs automated unit tests in build servers to improve software quality through frequent small efforts.

WebPageTest can be integrated into a CI pipeline to test web pages in the build or staging server. It can be used to indicate when the performance of web pages has regressed. Such integration can be done by customizing the running and reading of tests, as described in Chapter 9.

A common workflow would be to run WebPageTest after the CI pipeline successfully builds and all unit tests pass. Using either polling or pingback to retrieve WebPageTest results, some metrics from the full results set should be compared against expected metrics. For example, data.median.firstView.firstPaint must be less than 800 ms, or data.median.firstView.domElements must be between 800 and 1,000.

In this chapter, you will first learn how to consume WebPageTest API endpoints via the command line or as a Node.js application. You will also learn how to easily automate the whole process of running a test and reading its results in order to integrate with some popular CI tools.

Node.js Wrapper

webpagetest is a Node.js package available on NPM (package manager for Node.js). It provides a wrapper around the WebPageTest RESTful API with the following features:

  • Normalizes API endpoints and parameter ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reducing MTTD for High-Severity Incidents

Reducing MTTD for High-Severity Incidents

Tammy Bütow, Michael Kehoe, Jay Holler, Rodney Lester, Ramin Keene, Jordan Pritchard

Publisher Resources

ISBN: 9781491902783Errata Page