Recording network activity during live tests
Have you ever used the 'Net' panel in Firebug to look at a page load and see exactly what files are being loaded when you enter a url? This useful tool in Firebug on Firefox can be used to optimize page load times and it can also be used to view http requests being generated by ajax calls on your page. While this is a great tool, it is not universally available across other browsers such as IE, Safari, etc, much less across other devices such as the iPhone. Wouldn't it be great if it was?
We have added a network record button to the live test console. This will enable you to start and stop a network recording of the ethernet traffic being generated in the configuration you are currently testing. Once you stop recording, the network capture is viewable. We are using a couple of pretty cool open source tools to accomplish the conversion and visualization of the traffic:
pcap2har - Converts a packet capture to a har file - source at https://github.com/andrewf/pcap2har
harviewer - Allows you to visualize the contents of a har file - http://www.softwareishard.com/blog/har-viewer/
The HTTP Archive (HAR) format is a standardized way to represent captured network traffic. Our network record button records the packets as a packet capture file, which is the same format tools such as wireshark save packet captures in. We make this packet capture available for download if you want to examine it in Wireshark. We then convert the file using the pcap2har and show the content of the HAR file using the harviewer.
We see a couple primary uses for this tool:
1) Looking at page load time, and optimizing it across the various browsers and platforms. There are tools which will allow you to analyze what files are loading, such as firebug, but it is difficult to do this across multiple platforms (ie Windows, Mac, Ubuntu, Android, iPhones, iPads). With the live test console, you can now do this. For advanced customers looking to optimize the speed at which their site loads across all platforms, this will be very useful.
2) Ajax debugging. For sites which make heavy use of ajax calls, seeing the network traffic is a critical debugging tool. Checking it on devices such as the iPhone was very hard - this new feature makes it very easy.
Here is a video showing the new network capture tool in action:
This tool will not show the encrypted https traffic. We would recommend keeping the network recordings fairly short, ie under one minute. Give it a try, and let us know how it works for you.
Ken, Mike, and Tony