> I am trying to put together a comprehensive regression suite for CGI based
> mod_perl web applications using LWP.  It involves sequences of CGI calls
> with expected results after each consecutive request.  But I noticed
> something about LWP: it caches requests, almost like it expects *only*
> static content.  So if you loop over a given sequence of HTTP requests, only
> the first one actually gets sent to the server.
> 
>   eg:
> 
> foreach (1..5) {
>    $ua->request(GET ('http://localhost/uri1'));
>    $ua->request(GET ('http://localhost/uri2'));
>    $ua->request(GET ('http://localhost/uri3'));
> }
> 
> # this code will only send 3 requests to the webserver, NOT 15
> 
> Has anyone done similar work making a regression test using LWP ?  Is there
> an easy way to turn off this caching behavior?

First I work on a similar suite as well. I didn't want to announce it yet,
before I get some things working. But since you've mentioned it here, here
we go... Hope to get the first version out of the door in a few days.

Regarding LWP, I've used a similar to ab script as described at
http://perl.apache.org/guide/performance.html and I've found the results
are very different if you the same test with ab and LWP::Parallel, so I'd
not recommend using it if you want to figure out the *real* numbers. Do
you see a different behavior with your tests?

So based on these findings I use ab and parse the output to make a
different report than ab does.

I didn't find the answer for your original answer in the  LWP::UserAgent
manpage, but probably the right address is the libwww list:

       The latest version of this library is likely to be
       available from CPAN as well as:

        http://www.linpro.no/lwp/

       The best place to discuss this code is on the
       <[EMAIL PROTECTED]> mailing list.

______________________________________________________________________
Stas Bekman             | JAm_pH    --    Just Another mod_perl Hacker
http://stason.org/      | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.org    http://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
----------------------------------------------------------------------

Reply via email to