--- On Wed, 8/10/08, Philippe Bruhat (BooK) <[EMAIL PROTECTED]> wrote:
 
> Is there any way for a test suite to use the preferred
> database of a
> tester? Something like a TEST_DATABASE_DSN,
> TEST_DATABASE_USERNAME,
> TEST_DATABASE_PASSWORD triplet that CPAN testers could set
> to enable
> testing on different databases?
> 
> A colleague of mine is working on a very interesting
> module, but even though he could release a test suite
> relying on sqlite, I thought it would be better to use
> any configured database that was available on the
> tester's system.
> 
> Is there a recommended way to do that?

I think I understand what you're trying to do, but be warned that this can be 
very problematic.  If you run your tests against a database different from the 
deployment database, you're taking a huge risk as different databases behave 
differently.  I've learned this the hard way while trying to use SQLite for 
tests even though the code was targeting MySQL.

So long as the user understands why this is, though, I don't see a problem with 
this (and there are certainly advantages).

Cheers,
Ovid
--
Buy the book         - http://www.oreilly.com/catalog/perlhks/
Tech blog            - http://use.perl.org/~Ovid/journal/
Twitter              - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Reply via email to