Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by xdg (Monsignor)
on Jan 10, 2007 at 14:18 UTC ( #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.

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

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? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2022-01-18 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (53 votes). Check out past polls.

    Notices?