Archive | Performance Testing RSS feed for this section

Performance and usability testing Facebook integration

10 Nov

Just wanted to blog about this as there doesn’t seem to be much discussion about this online or I’m not searching right.

I am assuming either of the following is occurring at present:

  • nobody has really implemented performance and usability testing around Facebook integration
  • people/organizations have done so (or to some extent) but have decided for company policy not to share their experiences

I write this because this is an interesting area of testing. In terms of load/performance testing, and also automation, there’s a fine balance between doing accurate and valid testing and abusing Facebook’s terms of service (for actual user accounts anyways). And on the usability performance side, it may be a pain to “set up” a Facebook account (real or not) with thousands of friends, or photos/albums, or posts, or likes, etc.

From my research, there’s only 2 ways of doing this:

  • using real Facebook user accounts, perhaps sometimes painstakingly set up (unless someone programmed a bot to do all the set up work). And being careful not to create too much activity that Facebook would ban/delete the account.
  • using Facebook’s test users API, which requires significant amount of investment in reading up on the documentation, and developing API client calls to interface with Facebook to do all the set up work for the accounts (unless done manually later) then to use the APIs with Selenium/UI automation and HTTP/web service/API load/performance testing.

See these links for references:

For me, I’m not looking to getting the details and code from others on how they automated Facebook for usability/performance testing but rather hearing experiences from others on how things worked out. What worked, what didn’t, pitfalls to avoid, etc. Like whether Facebook’s test users API is all that useful for rich functional automated testing or for high volume performance testing. For example, here are some Facebook integration examples in terms of from your site/service access Facebook for:

  • photos, where user has thousands of photos or albums
  • login, and you want to test what happens if you had a lot of users on your site/service login via Facebook connect at a given time period (burst or ramped up)

I find it also interesting that Facebook doesn’t mention anything about this area to help themself or other companies with regard to testing usabillity/performance with Facebook integration, since it affects them to some extent as well.

Taken further, this could also apply to other service integrations like OAuth login with Google, Yahoo, WordPress, etc.

Your  thoughts?


Automating the Capture of Web Timings with Selenium RC

6 Nov

This is a follow up to

The article gives sample code for Selenium 2 / Web Driver. Here I present tips to do equivalent for Selenium RC:

//some selenium code here to navigate site to get performance data for

timingJavaScript = “var performance = window.performance || window.webkitPerformance || window.mozPerformance || window.msPerformance || {}; var timings = performance.timing || {}; timings.domContentLoadedEventEnd;”;

timingResult = selenium.getEval(timingJavaScript);

//now an do whatever with the timingResult

Notice that the last line of javascript in the timing script simply lists the desired variable so that getEval can return it. You don’t specifically add a return statement.

Note that unless your language of choice can handle the the javascript object (with timing statistics as object properties), you may have to return the individual properties of interest as in example above, where I return specific property of the timings object. Or you would have to preprocess in javascript into a data format like a CSV or XML string to pass back to your language. If your language can natively handle it, with typecasting, etc. then you can just return the whole object, named “timings” above instead of the property “timings.domContentLoadedEventEnd”.

Note also that this isn’t necessarily the optimal javascript code to use, but at least it seems to work as an example.

Also, this was response from David Burns of the original article when I asked if the API worked with Selenium RC:

This should work on either Selenium RC or on WebDriver. All you really need is the JavaScript that I use in executeScript and run it in the window context. For RC I think its “var window = this.browserbot.getUserWindow()” to get the window.

Tea in Eighteenth-Century Britain

History of Tea Project at Queen Mary University of London

Phimosis - A Simple Cure (That is working for me)

No nonsense, no adverts, no sales pitch, just honest information.

Glass Onion Blog

Cheat sheets, post-its and random notes from the desk of a programmer

Abode QA

A Hub For Testing Minds...

The Test Therapist

Performance & Security Testing Blog


a programmer's hub

Let's Not Crash and Burn

it makes your brain tingle


“Incinerate Ignorance”

Anastasia Writes

politics, engineering, parenting, relevant things over coffee.

One Software Tester

Trying To Make Sense Of The World, One Test At A Time

the morning paper

a random walk through Computer Science research, by Adrian Colyer

RoboSim (Robot Simulator)

Visualize and Simulate the Robotics concepts such as Localization, Path Planning, P.I.D Controller


open notebook

a happy knockout mouse.

my journey into computer science

Perl 6 Advent Calendar

Something cool about Perl 6 every day


Inspire and spread the power of collaboration

Niraj Bhatt - Architect's Blog

Ruminations on .NET, Architecture & Design

Pete Zybrick

Bell Labs to Big Data