Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Seeking advice for testing a web service client

by xdg (Monsignor)
on Jan 10, 2007 at 14:18 UTC ( [id://593904]=note: print w/replies, xml ) Need Help??


in reply to Re: Seeking advice for testing a web service client
in thread Seeking advice for testing a web service client

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.

-xdg

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.

Replies are listed 'Best First'.
Re^3: Seeking advice for testing a web service client
by Corion (Patriarch) on Jan 10, 2007 at 14:24 UTC

    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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found