-1

So I've hit a bit of a dilemma with my application load testing. My application relies on valid Facebook logins as I create shadow records that correspond to the users who log in.

How can I load test my application while using Facebook calls (rather than disabling).

I need to ensure at least 100,000 users can connect without getting bogged down.

My code runs fairly fast so far on since loads I'm averaging 1000 ms pre-caching. But I'd like to do some more load testing before I turn on my cache.

How can I do this?

From what I've come across, everyone seems to say just turn off Facebook calls and load test as if the application was a regular site. Also, I came across something called friendrunner which seemed like it could be the solution to my problem. Except no one from there has gotten back to me as of yet.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Thillypickle
  • 31
  • 1
  • 5

1 Answers1

3

You can't. Or rather, you really shouldn't and probably can't anyway. Facebook is one of the more aggressive sites when it comes to introducing measures designed to prevent synthetic (scripted) interaction and if you try to get around these measures you risk Facebook taking measures against you (probably not legal, but they can surely suspend your account and if you have a corporate agreement with them it could get embarrassing).

But this shouldn't be an issue for performance testing. You simply need to spoof the Facebook calls and focus on writing scripts that only call the servers that you want to load test. This is best practice for any project. In the past, I have simply used random strings to simulate the Facebook account id and, where you application requires certain user information from an account, you will need to be slightly more creative and stub this out. As far as I can tell, friendrunner is just that, a Facebook stub.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Oliver Lloyd
  • 4,936
  • 7
  • 33
  • 55
  • well i found something not quite what i expect as in number of users however facebook does exempt and allow up to 500 users per app without spamming or "fake account" http://developers.facebook.com/docs/test_users/ – Thillypickle Apr 03 '12 at 14:52
  • So, to clarify, this is a new feature where you can create 500 'test' users who are not subject to the normal checks - this seems to have been introduce late last year. There are limitations though, mostly around the fact test users are silo'd and not able to interact with real users. That said, you will still probably find it easier to stub out FB, if you are primarily focused on your own app and not FB it makes sense to take them out of the equation. – Oliver Lloyd Apr 04 '12 at 08:30
  • I had a talk with one of the facebook devs and they said facebook may be implementing better testing methods to ensure an application doesn't have to hit a load wall after being released into production. I took your suggestion with turning off facebook calls and everything seemed ok. I also have set the cloud pool to auto spawn a new server once it hits a certain usage. thanks for your answer. – Thillypickle May 14 '12 at 13:16