---
title: TestingBot and BrowserMob Proxy
description: Today we have added support for using a BrowserMob proxy together with
  our Selenium grid.
source_url:
  html: https://testingbot.com/blog/2012/05/17/testingbot-and-browsermob-proxy
  md: https://testingbot.com/blog/2012/05/17/testingbot-and-browsermob-proxy/index.md
---
# BrowserMob Proxy Tutorial

By Jochen D.2012-05-17

[](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftestingbot.com%2Fblog%2F2012%2F05%2F17%2Ftestingbot-and-browsermob-proxy%2Findex.md)
 Share on Facebook 

[](https://twitter.com/intent/tweet?url=https%3A%2F%2Ftestingbot.com%2Fblog%2F2012%2F05%2F17%2Ftestingbot-and-browsermob-proxy%2Findex.md)
 Share on Twitter 

[](https://www.reddit.com/submit?url=https%3A%2F%2Ftestingbot.com%2Fblog%2F2012%2F05%2F17%2Ftestingbot-and-browsermob-proxy%2Findex.md)
 Post on Reddit 

 Share link 

 ![](https://testingbot.com/assets/blog/2012/05/testingbot_90.jpg "testingbot\_90")

Today we have added support for using a [BrowserMob proxy](https://testingbot.com/support/other/proxy) together with our Selenium grid.

By using this proxy, you can manipulate HTTP traffic during your tests, and do some other cool things too:

- Simulate network latency/traffic
- Capture performance data in HAR files
- Rewrite HTTP requests and responses
- Set and get HTTP headers

We provide a private and secure proxy for every customer, free of charge. The traffic flowing through this proxy will only be available to you.

Below is an example on how to start and use a proxy.

## Starting a new Proxy

To start a proxy, please make a GET request to our API: `curl -u API_KEY:API_SECRET http://api.testingbot.com/v1/tunnel`

We will boot up a pristine virtual machine for you, which should take no longer than 45 seconds. Once the machine is booted, make the same request again to obtain the IP address of your personal VM. Now that you have the IP, you can start using the proxy and do some interesting things.

## Use the proxy

In this example, we'll capture performance data in a `HAR file` for a single Selenium test in Ruby.

  

Start off by creating a listener on a free port: `curl -X POST http://IP:9090/proxy`

  

This call will return a free port (for example 9091), which you need to use in your test.

  

Also, create a HAR attached to the port you obtained: `curl -X PUT http://IP:9090/proxy/9091/har`

  

Now run the test with your proxy:

    #!/usr/bin/env ruby
    require "rubygems"
    require 'testingbot'
    gem "selenium-webdriver"
    require "selenium-webdriver"
    
    caps = {
      :browserName => "firefox",
      :version => "10",
      :platform =>"WINDOWS",
      :proxy => Selenium::WebDriver::Proxy.new(:http => "IP:9091") #use the 9091 port we retrieved earlier
    }
    
    urlhub = "http://API_KEY:API_SECRET@hub.testingbot.com:4444/wd/hub"
    client = Selenium::WebDriver::Remote::Http::Default.new
    client.timeout = 120
    
    @webdriver = Selenium::WebDriver.for :remote, :url => urlhub, :desired_capabilities => caps, :http_client => client
    @webdriver.navigate.to "http://testingbot.com/"
    puts @webdriver.title
    @webdriver.quit

  

When the test has finished running, you can fetch the HAR file from your personal proxy: `curl http://IP:9090/proxy/9091/har`

  

We have added a page in our support area with this [BrowserMob proxy example](https://testingbot.com/support/other/proxy).

  

Should you have any questions about this, please let us know in the comments or [contact us](https://testingbot.com/contact/new).

### Sidebar

#### TestingBot Cloud Testing

Run automated, manual and visual tests on remote browsers and devices. Sign up for a free trial.

[Free Trial](https://testingbot.com/users/sign_up)

#### Latest articles

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing)

##### Maestro Physical Device Testing

Maestro testing in parallel on physical Android and iOS d...

[Read more](https://testingbot.com/blog/maestro-physical-device-testing)

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing)

##### tvOS Physical Device Testing

Run automated tvOS tests on physical AppleTV devices

[Read more](https://testingbot.com/blog/tvos-automated-testing)

[![MacOS Tahoe Cloud Testing](https://testingbot.com/assets/blog/2025/tahoe.jpg)](https://testingbot.com/blog/macos-tahoe-beta-testing)

##### MacOS Tahoe Cloud Testing

Test your websites and apps on Apple's upcoming macOS Tah...

[Read more](https://testingbot.com/blog/macos-tahoe-beta-testing)

## Other Articles

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing "Maestro Physical Device Testing")

### [Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

Maestro testing in parallel on physical Android and iOS devices.

[Read more](https://testingbot.com/blog/maestro-physical-device-testing)

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")

### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[Read more](https://testingbot.com/blog/tvos-automated-testing)

[![MacOS Tahoe Cloud Testing](https://testingbot.com/assets/blog/2025/tahoe.jpg)](https://testingbot.com/blog/macos-tahoe-beta-testing "MacOS Tahoe Cloud Testing")

### [MacOS Tahoe Cloud Testing](https://testingbot.com/blog/macos-tahoe-beta-testing)

Test your websites and apps on Apple's upcoming macOS Tahoe (macOS 26).

[Read more](https://testingbot.com/blog/macos-tahoe-beta-testing)

[![ChromeOS Cloud Testing](https://testingbot.com/assets/blog/2025/chromeos.jpg)](https://testingbot.com/blog/chromeos-testing "ChromeOS Cloud Testing")

### [ChromeOS Cloud Testing](https://testingbot.com/blog/chromeos-testing)

ChromeOS Manual and Automated testing in the cloud.

[Read more](https://testingbot.com/blog/chromeos-testing)

## Ready to start testing?
[Start a free trial](https://testingbot.com/users/sign_up)

### Share this blog post
Close modal

Copy URL Copy Copied
