Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

( #427834=categorized answer: print w/ replies, xml ) Need Help??

Q&A > testing > How to test a module which needs a local HTTP server? 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-18 09:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls