Archive for September 2009
We are happy to announce BrowserMob Proxy a new open source tool for simulating network conditions.
Some early functionality:
- It can slow down network traffic, effectively simulating what a low-bandwidth user might experience.
- It can also easily intercept certain HTTP requests (via regular expression), allowing you to mock out unexpected results, such as 500 response codes, long delays is responses, or even unexpected content.
Please visit the main page to sign up for the mailing list, we’d love to get more people involved in the project.You can also go to the Git project page, where you can check out the source code and report bugs.
We hope you find this tool useful and we would love to get your feedback and improvements.
If one is doing monitoring or load testing on a live site it is often beneficial to filter out the test browsers from Google Analytics.
When in the Google Analytics Filter section simply Create New Filter, then give it a name, choose the domain name option, and paste in amazonaws.com. That will ensure that our load testing service and monitoring from Washington DC and Dublin, Ireland will get filtered.
For Dallas, TX monitoring, do the same thing, but use the domain cloud-ips.com.
For San Francisco, CA monitoring, use the domain gogrid.com.
By adding these three filters, your monitoring and load testing with BrowserMob won’t affect your analytics reports.
21
Differences between RBUs and VUs
2 Comments · Posted by lucas in FAQ, Load Testing Tips, Uncategorized
People often ask what are the differences between RBUs and VUs. Obviously RBUs are more realistic while VUs are the perfect vehicle for testing APIs, but here is a table giving you a breakdown.
| Feature | RBU | VU |
|---|---|---|
| Threads | 6 threads downloading data in parallel | Single thread downloading data in sequence |
| Ajax | Native support and simple to implement | Can be scripted but takes time |
| Flash | Has ability to test Flash interaction | Flash objects can be downloaded, but won’t be played |
| Reporting | Screen-shot of failed page captured; error codes from server | Content of last requested object captured; error codes from server |
| Max Throughput | 768KBytes/sec per request (up to 15 requests per browser) | 100KBytes/sec per virtual user |
Some things to take note of:
- There is a difference in the difficulty for scripting RBUs vs. VUs. RBU scripts are easier to create with the Selenium IDE tool and have validation built in. Because RBUs mimic human behavior the
scripts include built-in validation concepts. For example an error will be thrown if you try to click on an element that doesn’t exist because the page being displayed is a “server too busy” page instead of the expected page. With VUs, you have to code in your own validation logic. - VUs are the preferred way to test SOAP/REST and other “non-browser” HTTP requests.
- Often the right approach involves using a bit of both RBUs and VUs. The VUs can be used to lay down base load on “read-only” pages that don’t involve form interaction or AJAX. The 80/20 rule applies here, you can generate 80% of the read-only traffic with VUs and use RBUs for the remaining 20%.
We hope this give you a better understanding of the differences and relative strengths of RBUs and VUs.
No tags
19
IT World on Open Source Load Testing Tools
No comments · Posted by lucas in In the press, Uncategorized
IT World mentioned BrowserMob in an article on Open Source load testing tools. They did have a little trouble figuring out our “Open Source” credentials. Needless to say, Patrick has been a big advocate of open source tools, and is well known as part of the Selenium project. The service we offer utilizes those tools to allow users to create their own load testing scripts. We are big fans of Open Source and rest assured that we will continue to contribute to the community.
No tags
We are big fans of what DynaTrace is doing, they are a great compliment to testing with BrowserMob. They have written an nice article on integrating their performance testing monitor with Selenium and BrowserMob.
Selenium offers a feature to add additional HTTP Tags to each Web Request via DefaultSelenium.addCustomRequestHeader. This feature allows achieving the exact same result as I explained in my previous blog entry.
In order to make it easy for Selenium script developers to use this feature we (Patrick Lightbody from BrowserMob and I) came up with the following 2 requirements:
- every test case should automatically be tagged with the test case name. This ensures that we can link each transaction to the test case
- the scripter must have the option to change the tagged value within a test case to allow more granular linking to individual actions in a test case
The implementation for these requirements resulted in
- a custom TestRunner class (DynaTraceSeleniumRunner) that sets the default value for the HTTP Header to the current test case name
- a custom Selenium class (DynaTraceSelenium) that offers the scripter to change the value for the HTTP Header
Go to the full article to get the code snippets and integration examples.
No tags
CMSWire, the place to go for all things content management, wrote up a fine article on why small business should us BrowserMob for load testing.
If It Crashes, They Can’t Come
If your website is your company, then having it go down for any period of time can cripple you. Huge interest in your site can see the server(s) unable to cope with demand.
Your new product launch, interest generated by a story from a major news site, winning an award and other factors can all drive an upswell of visitors to your site. And, if it goes down as they all try to check it out, they’re unlikely to come back.
BrowserMob is here to prevent that by monitoring and stress testing a site — including AJAX and Flash sites — to see if it can handle the load. It can also find fundamental flaws and compatibility issues that could prevent potential customers having a good experience.
It’s a great introductory article for those new to website creation and why load testing is so important. Go check out their home page as well for more CMS industry news.
No tags
An issue near and dear to our hearts is website performance monitoring over time. Not just alerting you when your webisite is down, but helping to find trends in the site’s performance. Are you getting more users on the weekends? Is you’re site slowing down due to third party ads? These are the types of questions one can only answeri if the websites performance monitoring is done continuously.
This tool can be used to alert you if your site goes down, but we are hoping people will use it for a lot more. The main view offers a long-term trend-line of the websites performance as well as a view of a smaller section. By highlighting portions of the main trend-line at the bottom we can drill down into the website performance monitoring data.

By choosing a single record we can even see what elements of the page are causing poor website performance.

In the near future we hope to roll out other useful tools, such as object trend-lines that will show how a given object has performed over time. We hope that you will find and share new and interesting ways to use website performance monitoring to make your website a better experience for your users.
No tags
In case you missed our launch announcement on TechCrunch last Thursday I’m here to tell you that we are live. The new monitoring product is now available; take a look at our monitoring video overview. I’ll be writing some more about the new features and what we are hoping to achieve with monitoring in the future. But for now go give it a try. You can run free monitoring jobs to see how it works.
No tags
We recently wrote a post about how to randomize an IP address and tie it to the domain name for RBU scripts. Here is how it is done for VU scripts.
var ips = ['169.125.57.119', '169.230.103.88', '169.125.17.0', '169.125.17.68', '79.125.17.80', '169.125.38.66', '169.125.43.112'];
var ip = ips[Math.floor(Math.random() * ips.length)];
browserMob.log("Using ip " + ip);
var c = browserMob.openHttpClient()// useful function that rewrites the hosts and auto checks the response code
var get = function(url) {
var rewrittenHost = null;
if (url.indexOf('http://www.aktiesport.nl/') == 0) {
rewrittenHost = 'www.aktiesport.nl';
url = 'http://' + ip + '/' + url.substring('http://www.aktiesport.nl/'.length);
}
// create the request
var req = c.newGet(url);
// Leave validation text blank. This let us avoid specific validation
// but still get BrowserMob to capture the content if there is an error
req.setVerificationText('');
if (rewrittenHost != null) {
req.addRequestHeader("Host", rewrittenHost);
}
// make the request
var resp = req.execute();
// and check the response code
var code = resp.getInfo().getStatusCode();
if (code != 200) {
throw "Expected 200 but got " + code;
}
}
browserMob.beginTransaction()
You can now write the rest of the script as normal simply using mysite.com and ignoring any IP address issues. This is quite useful for running tests when your loadbalancer isn’t in place yet.
No tags
We recently had a customer that wanted to test a website that would be load balanced, but the server wasn’t installed yet. To get around this we randomly chose an IP address and then remapped it to the host. Insert this code at the top of your RBU Script and itwill randomly select one of the IPs each time it is run, but
still act as if it were going through the standard mysite.com host.
var ips = ['169.125.57.119','169.230.103.88','169.125.17.0','169.125.17.68',
'79.125.17.80','169.125.38.66','169.125.43.112'];
browserMob.log(”Using ip ” + ip);
var selenium = browserMob.openBrowser();
selenium.remapHost(”mysite.com“, ip);
selenium.remapHost(”www.mysite.com“, ip);
browserMob.beginTransaction();
No tags
