Tim Koopmans, one of the partners at Altentee, a partner of ours, recently wrote up some tips on how to emulate think time and pacing of scripts in BrowserMob, specifically for load testing. Tim provides some very handy code samples, so be sure to check them out, especially if you’re concerned about pacing of transactions/sec.
For load tests, yes (we’re working to add support for this to monitoring). You can use BrowserMob API to add any name/value pair to your transactions or steps. Here’s a simple example:
var selenium = browserMob.openBrowser(); var tx = browserMob.beginTransaction(); var step = browserMob.beginStep("Home Page"); selenium.open("http://example.com"); // record how long it took for some text to appear var start = new Date().getTime(); selenium.waitForTextPresent("dynamic text"); var end = new Date().getTime(); // get a special cookie out and store it var cookie = selenium.getCookieByName("myCookie"); tx.put("cookie_value", cookie); // and store the "text" timing, associated with the step step.put("text_timing", end - start); browserMob.endStep(); browserMob.endTransaction();
The important things to notice here are that both beginTransaction() and beginStep() actually return objects that represent the transaction or step, respectively. You can then call put() on those objects to associate arbitrary data, such as custom timings or cookie values, with them.
Then when the transaction is stored in the load test database, you’ll be able to look them up in the name_value_pairs table. For more information on the test database schema, consult the documentation.
One of our customers, SignalFive, recently published a case study about a project they did with Al Gore’s Alliance for Climate Protection.
The project, called the Repower America Wall, involved a massive, Flash-based interface in which thousands of user-created images and videos could be scanned through at high speed.
In the case study, they describe how they calculated the estimated site traffic and decided to use cloud services, such as Amazon and YouTube, to help the site scale. However, before launch they still needed to prove to the customer that the site was ready:
Our use of a real web browsers makes it really easy to do website load testing and monitoring. By default a page is considered to have timed out if the page “onload event” can’t fire within 30 seconds. However, sometimes the page appears to be fully loaded to a typical user and shouldn’t be counted as a timeout error in your tests.
We call these errors “soft timeouts”, and they require a little bit of code to ignore them:
var selenium = browserMob.openBrowser(); selenium.setTimeout(2500); function ignoreIfSafeTimeout(e, step, minObjects, acceptableThreshold) { if (e.message.indexOf("Timed out after ") == -1) { throw e; // this isn't a timeout, so throw it } var objects = step.getObjects(); var objectCount = objects.size(); if (objectCount < minObjects) { throw "Expected at least " + minObjects + " objects but only saw " + objectCount; } var errors = 0; for (var i = 0; i < objectCount; i++) { var object = objects.get(i); var code = object.getStatusCode(); if (code < 200 || code >= 400) { errors++; } } var errorRatio = errors / objectCount; if (errorRatio > acceptableThreshold) { throw "Expected no more than " + acceptableThreshold + " error ratio but saw " + errorRatio; } } browserMob.beginTransaction(); var step1 = browserMob.beginStep("Home Page"); try { selenium.open("http://marketwatch.com"); } catch (e) { ignoreIfSafeTimeout(e, step1, 130, 0.1); } browserMob.endStep(); browserMob.endTransaction();
A couple days ago we announced a brand new pricing system that lowered our pricing across the board. For our existing customers, this pricing is quite a bit different than what they were used to, so we wanted to put together a list Frequently Asked Questions about the new plans.
Is this new pricing more or less expensive?
By any metric, this a price reduction. We’re extremely excited to have found a model that controls costs for our customers while actually making the revenue flow for our company healthier.
Today we launched a brand new pricing structure for both our website load testing and website monitoring service. When coming up with new pricing for both our products, we set out do to four things:
- Make it simpler and easier for anyone to quickly understand.
- Make our advanced products (ie: our real browser services) more affordable.
- Give a better value by reducing our pricing across the board.
- Provide a free offering that never expires.
Load Testing Pricing
Our load testing service now has two types of fees:
- A base fee to use the software.




Recent Comments