Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to unit test code that used LWP

by Corion (Pope)
on Dec 17, 2012 at 12:38 UTC ( #1009157=note: print w/ replies, xml ) Need Help??


in reply to How to unit test code that used LWP

I use two approaches. The harder but more versarile approach is to distribute and spawn a custom webserver that exhibits the intended (error) behaviours under well-known URLs. See WWW::Mechanize and WWW::Mechanize::Firefox for examples of that. The other approach is to use fike:// URIs in the strategic places to return (broken) content with status 200 (or 404 for "not found").


Comment on Re: How to unit test code that used LWP
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2015-01-26 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (197 votes), past polls