[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

load testing tool - Please advise?

Mmcolli00 Mom

4/10/2009 4:33:00 PM

Will you point me in the right direction to which program will be good
for load testing? I have many regression tests that will test for one
user and one ie session at a time, however I am looking for a program
that will work with watir and drive several applications using multiple
concurrent users.

Thanks MC
--
Posted via http://www.ruby-....

10 Answers

Kyle Schmitt

4/11/2009 1:24:00 AM

0

I'd go straight for JMeter.

WATiR works by driving a browser, and you just aren't really going to
be able to stress test a webapp that way. Even with several machines
running the tests.

Jmeter works by simulating user sessions, it isn't a whole browser.
It handles sessions and cookies, but other than that just sends http
commands to the server. Because of it's design, it can easily
generate a lot of traffic from multiple different sessions on a single
machine, and really give the server a working over.

It takes a few days to get really good at, but it's free (open
source), currently maintained, and very _very_ powerful. It's heavily
java based, and any scripting done in it is though java-esqe scripting
languages, not ruby. That said, it's easy to make it read values from
csv and xml files for dynamic tests, so you can do a whole lot without
much scripting.

When I worked as a test-developer it's what I used for stress testing,
while relying on WATiR for other testing.

--Kyle

Kyle Schmitt

4/11/2009 1:29:00 AM

0

Just one more thought..

JMeter allows you to record sessions. A few times I recorded the
actions of WATiR tests through JMeter, and then used those as the
basis of some stress tests. It worked OK, but my WATiR tests didn't
really simulate real user behaviour. If your tests do, then that may
be a good way of getting going.

--Kyle

Mike Stephens

4/11/2009 10:38:00 AM

0

Kyle Schmitt wrote:
>
> WATiR works by driving a browser, and you just aren't really going to
> be able to stress test a webapp that way.

Could you expand on that? I would have thought using a browser is the
very best simulation of a user you could have.
--
Posted via http://www.ruby-....

Ghost Steven

4/11/2009 1:21:00 PM

0

Mike Stephens wrote:
> Could you expand on that? I would have thought using a browser is the
> very best simulation of a user you could have.

http://wtr.ruby...
--
Posted via http://www.ruby-....

Kyle Schmitt

4/11/2009 1:39:00 PM

0

Well, if you think about it, what does the server care about? Sending
data, and receiving commands.

As far as it's concerned, there is no difference between firefox opera
and a 15 line ruby script, as long as a program asks for the same
files, and sends the right commands.

If your goal is to test the web application server under load, that's
what you want. You don't care if something isn't displayed right, or
if javascript does what it's supposed to, because the server doesn't
care. You test all of those things: javascripts working right,
rendering, does this drop down show up at the right spot, does this
form work like we expect, etc; using watir or browser based tests.
You test for performance and concurrency problems etc using stress
tests. For instance, you want to test that 100 users simultaneously
submitting a new recipe to your "biscuit enthusiast" site will
actually take the submissions, and not crash with a mysql error.

It's two different types of tests, using two different types of tools.

Phlip

4/11/2009 1:44:00 PM

0

Mike Stephens wrote:
> Kyle Schmitt wrote:
>> WATiR works by driving a browser, and you just aren't really going to
>> be able to stress test a webapp that way.
>
> Could you expand on that? I would have thought using a browser is the
> very best simulation of a user you could have.

Watir runs a browser and your web server. Both those systems have timeouts and
latencies that insulate your website from ultra high use.

Another soak test could use Mechanize (IIRC) to beat your server itself up via
HTTP. And, of course, you can use unit tests to beat up your code...

Peter Booth

4/12/2009 4:46:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

My two cents:

Load testing is hard, and often load tests produce results that are
not credible.
Watir isn't right for load testing, and there are many alternatives to
choose from.

There are two key questions:

1. What's the goal of the testing?
B: identify Bottlenecks
C: estimate Capacity

2. Are you wanting to
S: isolate a Single page/user operation
or G: test a Group of pages / paths

BS --> all you need is ApacheBenchmark, ab
BG --> JMeter, Grinder and Loadrunner all support remote agents,
scripts.
Grinder is Java based, like JMeter, but configured with jython scripts
Loadrunner is commercial, expensive, and visualizes results in a way
that
can sometimes help you to see patterns quickly.
CG,CS --> JMeter, Grinder and Loadrunner produce data that
overestimates throughput.
This is because they use a closed system to model workload
where a "user agent" issues a request, and then won't issue a second
until first is complete. If you want to estimate absolute capacity
then you need
a workload generator that can drive your system to the point of
overload, and the best
I know is httperf, an open source product created by HP. httperf
uses an open model to
drive traffic probabilistically

The best thing about load testing Ruby is "Ruby is slow and Rails
doesn't scale" (irony intentional). With Java its more likely that you
will need five or ten test clients to produce enough traffic to stress
your application. The HP Tech Report on httperf discusses some of the
issues that make it difficult do do effective load testing.

http://www.hpl.hp.com/techreports/98/HPL...

If your application uses Rails then I'd strongly recommend buying a
New Relic Silver subscription for at least month. It's a great time-
saver when diagnosing performance issues.

Hope this helps,

Peter Booth



I would strongly recommend using

On Apr 10, 2009, at 9:23 PM, Kyle Schmitt wrote:

> I'd go straight for JMeter.
>
> WATiR works by driving a browser, and you just aren't really going to
> be able to stress test a webapp that way. Even with several machines
> running the tests.
>
> Jmeter works by simulating user sessions, it isn't a whole browser.
> It handles sessions and cookies, but other than that just sends http
> commands to the server. Because of it's design, it can easily
> generate a lot of traffic from multiple different sessions on a single
> machine, and really give the server a working over.
>
> It takes a few days to get really good at, but it's free (open
> source), currently maintained, and very _very_ powerful. It's heavily
> java based, and any scripting done in it is though java-esqe scripting
> languages, not ruby. That said, it's easy to make it read values from
> csv and xml files for dynamic tests, so you can do a whole lot without
> much scripting.
>
> When I worked as a test-developer it's what I used for stress testing,
> while relying on WATiR for other testing.
>
> --Kyle
>


Mmcolli00 Mom

4/13/2009 1:52:00 PM

0


> I would strongly recommend using

Using what?
--
Posted via http://www.ruby-....

Kyle Schmitt

4/13/2009 2:01:00 PM

0

On 4/11/09, Peter Booth <pbooth@nocoincidences.com> wrote:
> My two cents:
>
> Load testing is hard, and often load tests produce results that are
> not credible.

Hear hear

Mmcolli00 Mom

4/13/2009 3:46:00 PM

0


> Hear hear

LOL ;-) thanks


--
Posted via http://www.ruby-....