Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Seeking advice for testing a web service client

by petdance (Parson)
on Jan 10, 2007 at 06:09 UTC ( #593840=note: print w/replies, xml ) Need Help??

in reply to Seeking advice for testing a web service client

Take a look at HTTP::Server::Simple.


  • Comment on Re: Seeking advice for testing a web service client

Replies are listed 'Best First'.
Re^2: Seeking advice for testing a web service client
by xdg (Monsignor) on Jan 10, 2007 at 14:18 UTC

    I'm not sure I understand how this improve on mocking/wrapping LWP::UserAgent::request(). I still need to inject the mock response to a request to HTTP::Server::Simple -- and this adds an extra layer of complexity. Is there some sample code you could point me to?

    HTTP::Server::Simple seems to be at the heart of many test failures on Win32, so I'm extra wary of using it if I don't have to. c.f. Vanilla Perl Problem Modules: Test::HTTP::Server::Simple, Test::WWW::Mechanize.


    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      For my tests of WWW::Mechanize::Shell, I wrote me Test::HTTP::LocalServer, which allows me to test simple interaction by providing canned responses and logging the incoming requests and outgoing responses. Depending on what you want to do, this might be sufficient for your needs, as all higher-level interaction can be faked by mocking LWP::UserAgent::request I guess.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://593840]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2022-01-21 14:18 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (59 votes). Check out past polls.