---
title: TestingBot and BrowserMob Proxy | TestingBot Blog
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.md
---

# BrowserMob Proxy Tutorial

By [Jochen D.](https://testingbot.com/about/jochen-d)2012-05-17

 Share on Facebook 

 Share on Twitter 

 Post on Reddit 

 Share link 

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:

```ruby
#!/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).

[← Previous post Webdriver Backed Selenium: use RC and WebDriver together](https://testingbot.com/blog/2012/05/14/webdriver-backed-selenium-use-rc-and-webdriver-together) [Next post → TestLab: run your tests and suites in our online CI](https://testingbot.com/blog/2012/06/26/testlab-run-your-tests-and-suites-in-our-online-ci)

## 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

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights)

#### Announcing AI Test Insights

Use AI Insights to quickly discover why an automated test...

[Read: Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright)

#### Selenium vs Playwright 2026

Comparing Selenium vs Playwright - which is the best test...

[Read: Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

[![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: Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

## Related Articles

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright "Selenium vs Playwright 2026")

### [Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

Comparing Selenium vs Playwright - which is the best test framework for your usecase?

[Read article →](https://testingbot.com/blog/selenium-vs-playwright)

[![Selenium 20th birthday](https://testingbot.com/assets/blog/2024/selenium20.webp)](https://testingbot.com/blog/selenium-20-years "Selenium 20th birthday")

### [Selenium 20th birthday](https://testingbot.com/blog/selenium-20-years)

Celebrate Selenium's 20th birthday. An overview of the years.

[Read article →](https://testingbot.com/blog/selenium-20-years)

[![Playwright Testing on TestingBot](https://testingbot.com/assets/blog/2023/playwright-testing.jpg)](https://testingbot.com/blog/playwright-testing-introduction "Playwright Testing on TestingBot")

### [Playwright Testing on TestingBot](https://testingbot.com/blog/playwright-testing-introduction)

Learn how Playwright can run your automated tests on a variety of browsers, local or remote browsers on TestingBot.

[Read article →](https://testingbot.com/blog/playwright-testing-introduction)

[![Selenium WebDriver BiDi](https://testingbot.com/assets/blog/2024/bidi.webp)](https://testingbot.com/blog/webdriver-bidi "Selenium WebDriver BiDi")

### [Selenium WebDriver BiDi](https://testingbot.com/blog/webdriver-bidi)

WebDriver BiDi support is now available on TestingBot. Learn how to use this exciting new improvement with your Selenium tests.

[Read article →](https://testingbot.com/blog/webdriver-bidi)

## More by Jochen D.

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights "Announcing AI Test Insights")
### [Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

Use AI Insights to quickly discover why an automated test failed.

[![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.

[![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.

[See all posts by Jochen D. →](https://testingbot.com/about/jochen-d)

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