questions: 1. Write a perl script that can take the
necessary parameters from QUERY_STRING or that has a list of different
usernames and passwords to be taken randomly.
Q: Specify just one
userID & password can run the muti-thread
operation?
4. Call that script from
ab.exe
Q: Can you give an
example?
Well, for the first question, that depends on your
application. There are applications that can be run with the same user in
different sessions at the same time (like Hotmail, which can be used by two
different users using the same login name at different locations at the
same time), and there are applications that doesn't allow two sessions at the
same time (like the administration page of an office-gateway router).
That's why i also suggested not to pass parameters in QUERY_STRING but to make a
script that randomly uses a list of users for different sessions.
About your second question, i don't mean to
directly test the script in ab.exe, but to put the script in a web server and
then use ab.exe to call that script exactly as i show you in my first
message.
Regards,
Paco.
----- Original Message -----
Sent: Tuesday, August 29, 2006 12:25
AM
Subject: Re: Perl to do web load
test
Thanks for your reply. The web system is a on-goning one
& it's encapsulated into "XXX.exe". I can user shell
qq/echo "cookie=...&path_info&...&..." |
XXX.exe/ to specify some parameter to finish a "post"
or "get" process. So I don't need apache to show the page for me.Actally,I
installed Apache just for my scripting debug. In this web system,after
login,I can get the cookie through regex,such as "HJIWLIKGZD".
What you
said is anothor way(use LWP::UserAgent),this
mothod needs support from Apache.
questions: 1. Write a perl script that can take the necessary parameters from
QUERY_STRING or that has a list of different usernames and passwords to be
taken randomly.
Q: Specify just one userID & password can run the
muti-thread operation?
4. Call that
script from ab.exe
Q: Can you give an example?
On 8/29/06, Paco
Zarabozo A. <[EMAIL PROTECTED]>
wrote:
Hi,
You cannot specify in ab.exe any parameter
(other than QUERY_STRING of course). What you need to do, is to write
yourself a single script in perl that makes a series of tests. I recommend
the following:
1. Write a perl script that can take the
necessary parameters from QUERY_STRING or that has a list of different
usernames and passwords to be taken randomly.
2. Organize your script in subrutines for every
task (logins, queries, updates, etc).
3. Create a master subrutine that starts by
calling in a fixed order every task, and then starts calling your subrutines
in a random way, several times.
4. Call that script from ab.exe
You can even log to a text file (or a temporary
table in your DB would be better) the start time and end time of every
subrutine, along with the whole script start and end times. This way, you'll
be able to measure where your tasks need improvement.
Make your script so it doesn't need cookies or
browser related stuff. That's my reocomendation.
However, if you still want to test the whole
process as a real user browsing the site, then make a script using the perl
module LWP::UserAgent. You need to read the documentation, but through that
module, you can emulate a real browser, with cookies and ssl if necessary.
You can get urls and post forms. Just like a browser would. However, this
would need you to read several documents about it (your perl distribution
comes with them), and certain level of regular expresion to read the
asnwers. Also, SSL protocol is supported only if you have SSLeay, wich
doesn't come with the standar distribution. You can install it with ppm.exe
using a seconday repository (
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58 is
an excelent place to get modules that you can't find in Active
State).
I hope this helps. :-)
-----
Original Message -----
Sent:
Monday, August 28, 2006 8:22 PM
Subject:
Re: Perl to do web load test
Yes,it does works.
but still have some
questions:
1 . As you know,many B/S systems need a cookie to
login,how can I send this parameter to "ab.exe"?
2 . If I wanna use
perl to write some scripts myself,what should I do?
On 8/28/06, Paco
Zarabozo A. <[EMAIL PROTECTED]
> wrote:
Hello,
Apache2 for Win32 comes with a utility for
that. Taking for granted that it's installed on C:\Apache2, you can call
it like this:
C:\> cd C:\Apache2\bin
That makes 5 concurrent requests for the
specified url. I think this utility was created to compare mod_perl 1
against mod_perl 2 in Win32, since the first one didn't really have the
ability to manage multiple requests at the same time.
Just write a special script
that executes in one big chain all the heavy tasks you want to
test in a concurrent scenario and call it with that program. Also, you can
make the script with some logging of the results, so you can check times
for every part of it and know where to check if somethings
wrong.
I hope this helps. ;-)
Paco Zarabozo
-----
Original Message -----
Sent:
Monday, August 28, 2006 2:08 AM
Subject:
Perl to do web load test
Currently, I need to do some web load testing. So, I
wanna know if there are some modules to do this.
Such as : parallel
login & operation, heavy load DB operation...
Thanks for your
help!
-- ------======Nerazzurri======------
--
------======Nerazzurri======------
--
------======Nerazzurri======------
_______________________________________________ ActivePerl mailing
list ActivePerl@listserv.ActiveState.com To unsubscribe:
http://listserv.ActiveState.com/mailman/mysubs
|