Patrick Lightbody

Patrick is the founder of BrowserMob, the world's first on-demand, low-cost load testing service that uses real browsers. Prior to BrowserMob, Patrick has been a senior Product Manager, Professional Services manager, and senior software engineer at companies such as Gomez, Jive Software, and Cisco Systems. Patrick is also an avid open source contributor and twice published paperback book author, with major contributions to Selenium and Struts.

While we support Selenium as our core API and Selenium is a popular functional testing toolkit, we do not currently support running tests written in languages like Java/C#/Ruby/Python/etc. There are two reasons we don’t support general unit test-style tests:

First, Often these kinds of tests contain references to resources that aren’t accessible when running the test in the cloud. For example, we’ve seen tests that have hard coded URLs (ie: http://localhost:8080) and reference databases and web services to verify backend functionality.

By default a BrowserMob script will run with cache and cookies flushed before every transaction. This is the same for website load testing or website monitoring. This also means that the timings we collect will represent a new visitor experience.

But what if you want to measure what what the experience is like for a returning visitor? In other words: how do you prime the cache?

Fortunately, this is easy in BrowserMob. You simply write your tests to visit the site once outside of the transaction (which controls when measurements start) and then visit it again:

The BrowserMob Local Validator is a great tool to help you create and debug scripts on your own desktop. Because the script runs on your own computer, you get to see the browser work through the script right in front of your eyes.

Sometimes customers wish to run the the validation tool through an HTTP proxy. For example, if you can’t make outbound HTTP requests without using a proxy because of your firewall, you won’t be able to use the Local Validator until you configure it to use a proxy.

At 3:38PM PST today the BrowserMob services (monitoring and load testing) began to experience service degradation. By 3:45PM a significant hardware failure took place, causing various subsystems to fail and go offline.

Thanks to multiple redundant monitoring alerts and our 24×7 network operations, we were able to identify the problem almost immediately and take action to correct it. Unfortunately, because the failure was disk-related, it took 38 minutes for us to recover from the failed hardware and bring everything back up online by 4:23PM.

During this time the following services were interuppted:

  • General: The website/portal was inaccessible

One of the cool things about having been acquired by Neustar is that we get to work with a bunch of other great companies, such as Webmetrics, Quova, and UltraDNS. And sometimes those companies do something that we think is so cool that we want to share it with the BrowserMob community.

Last week was one of those days: UltraDNS launched UltraTools.com, a free site that contains over 100 DNS-related tools and tests designed to make it easier to manage your DNS services.

BrowserMob uses almost every AWS service out there. I plan to start a blog series outlining how we use them all, but here’s the quick overview:

  • EC2 – We routinely launch thousands of instances every day to generate websites load tests. This is our primary use in the cloud and BrowserMob could not exist with EC2.
  • S3 – We store every individual bit of detail about every test we run in standard formats such as MySQL database dumps or HAR files.
  • SQS – Every website monitoring check is managed through Amazon’s excellent queue technology.

Sometimes our customers wish to change the User-Agent for our browsers. By default it looks something like this:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7; BrowserMob RBU) Gecko/20100713 Firefox/3.6.7

Note the extra “BrowserMob RBU” reference there. You can use that to filter out third parties, such as analytics, ads, etc. However, you may want to actually change this value. To do so, you should use our advanced HTTP processing interceptor support:

var selenium = browserMob.openBrowser();
var c = browserMob.getActiveHttpClient();
 
c.addRequestInterceptor(function(req) {
  req.removeHeaders("User-Agent");
  req.addHeader("User-Agent", "Bananabot/1.0");
});

This will remove the standard User-Agent header and then add a new one with the value “Bananabot/1.0″.

When using Selenium, whether it’s for load testing, website monitoring, or just for basic functional testing, you will eventually find the need to work with lists of elements. When this need arises, you will probably find that the getXpathCount function is really helpful.

As you might expect, get getXpathCount returns a number that is the count of elements matching the supplied xpath expression. For example, suppose your DOM/HTML looked like this:

  • html
    • head
      • title
    • body
      • table
        • tbody
          • tr
            • td
          • tr
            • td
            • td
            • td
              • checkbox

I’ve got great news to share with you – BrowserMob has been acquired and is joining the Neustar family of services, which includes UltraDNS and Webmetrics!

I started BrowserMob in 2008 with the belief that a combination of cloud computing and real browsers wrapped up in a self-service model could dramatically change how people used load testing. Neustar shares that same philosophy and has built a world-class portfolio of cloud-based performance services that currently has over 3,000 customers. I’m most excited by this partnership because it means that we can now offer our unique services to an even greater audience.

Today we received an excellent question from a customer of ours:

We were wondering if you all have any information that says “X Unique visitors per day translates into Y simultaneous users at any given time.”

Essentially, we’re looking for a way to determine how many simultaneous users we should load test with if we know the sites normal daily traffic.

© 2012 The BrowserMob Blog Suffusion theme by Sayontan Sinha