On Wed, Oct 08, 2008 at 05:34:52AM -0700, Ovid wrote:
> > 
> > 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.

Actually, I'm not trying to test a module/application that is supposed
to use a generic subset of SQL assumed to work everywhere.

It's more intended to support modules that explicitely work on several
database engines (maybe thanks to phrasebooks or ORMs or anything)
and want to run their test suite on any available database (assuming an
empty database at the beginning of the first test), or even several of
them if they are available.

-- 
 Philippe Bruhat (BooK)

 The right answer is worthless with the wrong question!
                                    (Moral from Groo The Wanderer #88 (Epic))

Reply via email to