Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Answer: How to test a module which needs a local HTTP server?

by jplindstrom (Monsignor)
on Feb 03, 2005 at 21:52 UTC ( #427834=categorized answer: print w/replies, xml ) Need Help??

Q&A > testing > How to test a module which needs a local HTTP server? - Answer contributed by jplindstrom

Depending on what you really need to test, it may work to... not use a web server. Check out WWW::Mechanize::Cached.

First you run your tests live on your machine while having the caching function save the pages to files (or some other caching mechanism). Then you can just re-run the test again, essentially in off-line mode since the results will come from disk.

I actually started doing this today when the thing to test wasn't "get web page", but to combine that with some processing.

/J

  • Comment on Answer: How to test a module which needs a local HTTP server?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-12-10 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (159 votes). Check out past polls.