views:

494

answers:

4

I've got a somewhat complex web application, containing Flash and javascript on the client side and PHP functionality server side. The PHP functionality contains system calls (exec()) to merge/edit/create files with gnu software (*nix environment) as well as api calls to REST services for uploading these files (this will be done with cron jobs, however).

We're not ready to go live just yet, we're expecting a large server load directly at launch, so we need to stress test the environment. I've looked in to some libraries, like JMeter, but afaik these libraries cannot handle the Flash - and the merge/edit/create depends on input from the Flash app. How can I stress test my environment in the best possible way?

Best regards,

+2  A: 

If you are running Apache, you could use ab to stress test the server side of your application.

Apache HTTP server benchmarking tool

Don't know if it can handle Flash and/or Javascript though.

Alex
+2  A: 

For the back-end PHP, I'd just use timers on every method and try scrape some milliseconds here and there. I wouldn't worry too much about PHP.

For the front-end stress test, I'd hammer it using something like iMacros.

More info here

Web Testing

Web professionals can use iMacros for functional, performance, and regression testing of web applications. The built-in STOPWATCH command captures precise web page response times. iMacros also includes support for many AJAX elements.

Hope this helps.

keyle
+2  A: 

Selenium might be a good way to go; it handles AJAX / JavaScript very well, and Adobe has a Selenium extension specifically for Flash testing. Selenium has a bit of a learning curve, but it's well worth the time.

gareth_bowles
+2  A: 

As another person recommended, Selenium could be good here. The only issue is that if you're trying to do stress testing, a single Selenium browser won't drive enough concurrency for you.

My company, BrowserMob, provides Selenium-based load testing services, in which you can generate 100+ concurrent Selenium scripts hitting your site. We also have support for Flash using native clicks, meaning you don't to even do the trick that Gareth linked to (though that's recommended if you can).

That all said, just because your site uses Flash, it doesn't mean it necessarily requires a real browser to do the performance testing. If the Flash component speaks raw HTTP, then a tool like JMeter or my company's "Virtual User" service (ie: doesn't use Selenium) will likely work. If it speaks AMF over HTTP, you can still do it, but it's usually a bit harder. But if you really want to test things like video streaming, you may need to go a bit more advanced.

Patrick Lightbody