# Load testing using ruby

**URL:** <https://www.ruby-forum.com/t/load-testing-using-ruby/85664>\
**Category:** Ruby\
**Created:** [February 15, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/load-testing-using-ruby/85664 "2007-02-15T12:01:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![swapnali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@swapnali](https://www.ruby-forum.com/u/swapnali)\
**Post date:** [February 15, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/load-testing-using-ruby/85664/1 "2007-02-15T12:01:00Z")

</div>

Hi

I want to simualte 300 users for an application.  
Can someone tell me how many users can be simulated using ruby ?

Thanks,  
Swapnali

---

<div class="post-metadata">

**Author:** ![swapnali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@swapnali](https://www.ruby-forum.com/u/swapnali)\
**Post date:** [February 15, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/load-testing-using-ruby/85664/2 "2007-02-15T14:47:09Z")

</div>

On 2/15/07, swapnali [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi
> 
> I want to simualte 300 users for an application.  
> Can someone tell me how many users can be simulated using ruby ?

Can you be more specific? Uses of what?

---

<div class="post-metadata">

**Author:** ![swapnali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@swapnali](https://www.ruby-forum.com/u/swapnali)\
**Post date:** [February 15, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/load-testing-using-ruby/85664/3 "2007-02-15T19:20:47Z")

</div>

If this is a webapp (and from your 300 user request I’m guessing it  
is), ruby is not currently be the right way to test. The load/stress  
testing components available for Ruby are less than complete.

Take a look at Jmeter ([Apache JMeter - Apache JMeter™](http://jakarta.apache.org/jmeter/)). It will  
probably do what you want it to do, and most likely will only take you  
between one afternoon to two days to complete a good suite of tests.

Don’t give into the temptation to try and use Watir or some other  
functional testing system for load/stress testing. They aren’t  
designed for it; getting them to work in this situation will be an  
exercise in futility; any results will be dubious at best. I’m  
working as a test developer, and Jmeter is my tool of choice for  
load/stress testing of web applications.

As with any testing, a little common sense will go a long way, and  
using common sense won’t be completely natural on the first attempt 😉  
I know this from experience.

Give a holler here, or on the jmeter-mailing list if you need help.  
They are very responsive and helpful (just like the ruby list!)

–Kyle

---

<div class="post-metadata">

**Author:** ![swapnali](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@swapnali](https://www.ruby-forum.com/u/swapnali)\
**Post date:** [February 15, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/load-testing-using-ruby/85664/4 "2007-02-15T19:54:55Z")

</div>

On 2/15/07, Kyle S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> designed for it; getting them to work in this situation will be an

I would recommend starting with httperf, personally. Its a nice,  
simple command line tool that, according to many, is one of the few  
load testing tools to provide accurate and useful stats. Zed  
recommends it for testing mongrel, for instance. I haven’t use JMeter  
personally, but I think ab or httperf would be the best thing to try  
first, before getting more complicated.

You could very easily script httperf it with ruby, and there is also  
autobench which is a perl wrapper around httperf.

See also:

- [http://www.hpl.hp.com/research/linux/httperf/](http://www.hpl.hp.com/research/linux/httperf/)
- 

> **[HTTP performance testing with httperf, autobench and openload](http://agiletesting.blogspot.com/2005/04/http-performance-testing-with-httperf.html)**
>
> Update 02/26/07 -------- The link to the old httperf page wasn't working anymore. I updated it and pointed it to the new page at HP. Here's ...

- Rob
