WebPageTest (WPT) is a great tool and the public instances cover many scenarios but sometimes I need a private instance, for example when testing sites that aren’t publicly accessible yet or debugging a script.
Setting up a private instance is reasonably straightforward but there are a few gotchas and some settings aren’t always obvious the first time around.
I’ve been asked by a few people how I set up instances, so these notes explain the steps I follow to create an ‘all in one’ installation with the server and test agents on same machine.
The notes are based on WPT install guide and can also be used as a guide to creating separate a server and agents, although I’d use a Linux variant for the server in that case.
Base Windows Configuration
Start with a fresh Windows 7 install (I used 32-bit Professional, the virtual machines Microsoft make available for browser testing are another option but stick with 32bit)
Create a user with local administrator rights and set them to log in automatically when the machine starts up. (this has security implications and some network managers may not like it)
Turn off UAC
Turn off any screensaver
In the power saving settings choose never as the options for turning off the display and putting the computer to sleep
Set firewall rules to allow port 80 & 443 TCP inbound
Add shortcuts for Shutdown and Restart
When accessed via Remote Desktop (RDP), Windows 7 doesn’t display the Restart and Shutdown options on the Start menu, so I add shortcuts for them:
shutdown -f -s -t 1
shutdown -f -r -t 1
I also add Notepad++ and 7zip so I have a decent text editor and archiving tool
Download and install Apache. Apache 2.2 is currently the most recent version with a Windows binary.
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
Update the configuration to include the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Uncomment these modules
1 2 3
Add the PHP module (installed in next step)
Download PHP from http://windows.php.net/download (I used the zip of 5.4.7 VC9 Threadsafe)
Extract and copy contents to
Update the extension_dir path, and uncomment the php_gd2 extension
(zip and zlib are on by default in 5.4.7)
Install WPT server
Download the latest version (2.7.2 at time of writing) of WPT from https://sites.google.com/a/webpagetest.org/docs/private-instances/releases
Extract the contents of the www folder from webpagetest.2.7.2.zip into
Add test agent locations / configurations
Editing locations.ini is the probably the area I make the most errors and it can be confusing until you grasp it’s hierarchical nature.
The browser configuration labels must match the labels used in urlblast.ini and wptdriver.ini in the test agent configurations.
I name my labels as location-testdriver pairs e.g. local-urlblast (for IE) or local-wptdriver (for Chrome and Firefox)
This is a sample config that matches the test agents below, more locations can be added:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Fire up a browser and navigate to 127.0.0.1 and you should see the Web Page Test Private Instance home page.
Extract the contents of the agent folder from webpagetest.2.7.2.zip into
Install Chrome and Firefox (if you want them of course)
Install ffmpeg (http://ffmpeg.zeranoe.com/builds/) and add its bin folder to the path. I tend to install it in
Install AVISynth using the installer in c:\wpt-agent
Install the DUMMYNET ipfw driver
WPT 2.10 introduced a 64bit version of dummynet. Depending on your platform choose the version of dummynet you require and copy the contents of the 32bit or 64bit folder into c:\wpt-agent\dummynet.
- In the properties of the Network Adapter used for Internet access
- Click “Install”
- Select “Service” and click “Add”
- Click “Have Disk” and navigate to c:\wpt-agent\dummynet
- Select the ipfw+dummynet service (and click through any warnings about the driver being unsigned)
If you’re connected via RDP you may lose the connections while installing ipfw plus dummynet and need to re-connect.
In the startup folder, create shortcuts to
The Location entry must match the location label for the IE section of locations.ini
1 2 3 4 5 6 7 8 9 10
- Configure Chrome and Firefox
Again the location entry name must match the revelant section in the server locations.ini
I update the software paths to retrieve updates from the local machine rather than webpagetest.org but that’s a personal preference
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
- Clearing prompts and warnings
Launch each browser and clear the prompts e.g. should it load extensions, should it be the default browser etc.
From the startup folder launch urlBlast, wptdriver and ipfw.cmd manually. Give each of them permission to run even though they’re unsigned, and uncheck the ‘always do this box’
Restart the machine
Whenever you RDP into a WPT test agent, you should always restart the machine as the Window lock screen is displayed when disconnecting RDP.
You should now have a working ‘all in one’ install of Web Page Test, point your browser at the WPT machine and launch tests for IE, Firefox and Chrome just to check they work.
If you’ve got any questions or spot any mistakes feel free to leave a comment or drop me an email.
There’s also a troubleshooting guide for the most common problems at the foot of the main WPT installation instruction (https://sites.google.com/a/webpagetest.org/docs/private-instances)
If you want to discuss private instances further or need help WebPageTest Forum for Private Instances is the place to go.
30 Apr 2013 - Added 32bit / 64bit dummynet details 1 Mat 2013 - Corrected extraction of agent from zip and uncheck of “allways check this”