Hi Lee,

> Does anyone have any recommendations for tests for CPAN modules which  
> rely upon the ability to create a table in a database?
>
> Currently, my module's test suite tries some common username/password  
> combinations on the MySQL 'test' database, and if that fails, skips all  
> DB-related tests.
>
> I was wondering if there was a better idea.  Maybe a Test::DBH module...?

You're nearly there, its called 'Test::Database' :)

http://search.cpan.org/perldoc?Test::Database

It has the benefit that it can essentailly use any database engine
installed, or use a specific one. It will create a database that is
specific to you, so won't clobber any existing database, and allow you
to test your application with a working database.

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>


Reply via email to