Using the BrowserMob proxy for measuring performance
BrowserMob proxy is a free tool that supports monitoring and manipulating the network traffic from web applications. It can capture the performance data from a web application in an HTML Archive (HAR) format, as well as manipulate the browser behavior and traffic, such as whitelisting and blacklisting content, simulating network traffic and latency, and rewriting HTTP requests and responses.
BrowserMob proxy helps in automating client-side performance data collection for a web application using the Selenium WebDriver.
In this recipe, we will set up a BrowserMob proxy for the Selenium WebDriver test to collect the performance data in an HAR format.
Getting ready
Download the BrowserMob proxy from https://github.com/webmetrics/browsermob-proxy/downloads.
Reference the BrowserMob proxy JARs from the lib
folder in the BrowserMob
proxy folder to your existing Selenium WebDriver test project.
How to do it...
Let's create a test that uses BrowserMob...