On Fri, Jan 07, 2011 at 06:40:26AM -0500, David Golden wrote: > Hi, gang. > > I'm co-maintaining HTTP::Tiny and writing tests for it. I'm > considering adding some simple "live" HTTP client queries (e.g. > against google.com) but don't want to prompt users for it and don't > want to connect out to the internet without permission. > > Therefore, I'm considering having those live tests run only when under > AUTOMATED_TESTING (protected by a check to confirm that the internet > is accessible, of course). Does that seem reasonable to people?
I'd say that was a tricky one. If the main point of the module is to use an internet connection, only running those tests under AUTOMATED_TESTING means a general user may install your module without running tests that could have shown that there was a problem with their particular environment. If they are simple connection tests, that I would think you should be fine. Any complex then running under AUTOMATED_TESTING is reasonable, and prompting (default to No) otherwise. For my ISBN Scraper modules, I test grabbing the pages from live sites as that is the whole point of the modules. If I can't get a connection I skip the tests. In my case its helped to spot when web sites have changed. Cheers, Barbie. -- Birmingham Perl Mongers <http://birmingham.pm.org> Memoirs Of A Roadie <http://barbie.missbarbell.co.uk> CPAN Testers Blog <http://blog.cpantesters.org> YAPC Conference Surveys <http://yapc-surveys.org> Ark Appreciation Pages <http://ark.eology.org>