Web Performance Calendar

The speed geek's favorite time of year
2016 Edition
ABOUT THE AUTHOR

Anthony Barré (@AnthoBarre) is software engineer at Fasterize, a webperf automation solution.

WebPageTest (WPT) is THE webperf tool for every engineer working in the webperf field. Public instances are very useful for single tests but as soon as you want to industrialize your work (think Continuous Integration on webperf), you need a private instance.

Back to 2014, installing the Windows test machines usually resulted in at least several hours of work and a bunch of questions about how to get the configuration working. There has been a huge step forward with the creation of an AMI for Amazon EC2. Patrick Meenan introduced the installation on Amazon Web Service in the Perf Calendar of 2014.

However, if you want to run your private instance on your own machine or on a location not covered by Amazon Web Services, it was pretty hard, especially if you came from Linux. We will cover in this article two ways to automate your private instance installation on Windows Server 2012.

Using the Salt Stack automation tool

Justin Phelps did a great job on a Salt script that allows to automate that installation.

Of course, with this option, the main requirement is using Salt Stack, with a Salt Master, and that could be a big barrier. However, if you already work with Salt, you will be able to install your agents automatically and very quickly.

You can watch his presentation here, during SaltConf15.

Using a PowerShell standalone script

At Fasterize, even if quite everything is fully automated, we don’t use SaltStack. So we’ve written a PowerShell script to do this install and we decided to opensource it. Our script is heavily based on the work done by Justin.

Starting is easy, you just have to download the script file on your Windows machine and edit the different settings on top of the file:

[String]$wpt_password = "p@ssword",
[String]$wpt_url = "http://www.webpagetest.com/",
[String]$wpt_location = "wpt_location",
[String]$wpt_key = "wpt_key",
[String]$windows_licenceKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"

Once it’s done, you can execute the script as an administrator, it will perform the following actions for you:

  1. prepare the machine (set the windows license, set the DNS resolver, …)
  2. create the user that will launch WebPageTest
  3. download the WebPageTest folder from Github
  4. configure WebPageTest
  5. install DummyNet network driver (used to emulate network conditions)
  6. schedule WebPageTest at start up

We appreciate any contributions on this project to make it more flexible and more robust.

Happy testing!