How to stress test simulating heavy load using Selenium

Sumit Ghosh picture Sumit Ghosh · Mar 26, 2012 · Viewed 11.5k times · Source

I have a system to test, which is a video ads distribution technology. I need to load every video like 1-2 mins to serve the ads. The videos are played in a Flash client and streamed as FLV streams like in YouTube.

The reason why I need to test it only via browsers -- and every other method won't work -- is to stress test both the video streaming servers and the ads servers simultaneously and displaying ads in real-time.

I have used Selenium, WatiN, Automation Anywhere and many other automation tools. However, when I am trying to start like 10000 browsers on my machine (32GB RAM, 16-core CPU), none of them are able to do the job.

With Selenium, I am able to start the maximum FireFox instances so far, but that's still too low: half of the instances don't run the test.

Any suggestions to do with Selenium?

Answer

digitaljoel picture digitaljoel · Mar 26, 2012

You aren't going to run 10,000 browsers on your machine. That would give 3.2MB of physical memory per browser instance and I'm pretty sure FireFox just won't like that.

You could create a JMeter script that hits your server with many threads. It won't interact with the UI but would simulate the load of many clients hitting whatever URLs you tell it. I believe it also includes the ability to record a session and play it back for easy setup of your sessions.