Back in September I explained how to create a private instance of Web Page Test running IE, Firefox and Chrome on Windows 7.
Recently I needed to add some iOS agents, after a bit of trial and error this is the approach I used.
I've added the mobile agents to my existing 'all-in-one' WebPageTest instance so if you've not read the original post it's worth having a quick scan first: Configuring an ‘all-in-one’ WebPageTest Private Instance
At a minimum you'll need access to a Mac with Xcode and iOS Simulator installed. If you want to use a real device as a test agent you will need an iPhone or iPad and an iOS developer account.
Building the Mobitest Agent
Confusingly there's some source code for a mobile agent in the WebPageTest SVN respository but as I discovered that's not the source we want!
We want the code for the Mobiletest agent that Guy Podjarny & Co created at Blaze (now part of Akamai).
- Download the Mobitest source
https://code.google.com/p/mobitest-agent/source/checkout and build it using Xcode.
Install and Configure the Agent
- Using Xcode launch the Mobitest App on the iOS Simulator or a physical device.
Mobitest has a set of default settings that need updating to match the WebPageTest instance, for example:
Default settings on left, settings for my install on right.
Update Jobs URL 1 to match the URL of your WebPageTest instance, and set the Unique Agent Name and Location (location must match the location you configure in WebPageTest).
Unless you are using using keys you'll need to remove the default Location Key too.
I also enable Restart After Each Job and Auto-Poll (scroll down for these settings)
Go back to the iOS home screen, launch Mobitest, press Poll Now and the agent should now poll the server for jobs.
Add the agent to WebPageTest
Once the test agent is up and running we need to update WebPageTest's configuration so jobs can be scheduled for the new agent.
Add the new agent under the relevant location section (
3=Local-iPhone in the example below)