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.
Permanent link to this post (111 words, estimated 27 secs reading time)
Recent Comments