DBI backend tests

Josh Sled jsled at asynchronous.org
Tue Sep 1 09:37:52 EDT 2009


John Ralls <jralls at ceridwen.fremont.ca.us> writes:
> Yeah, don't. That is, don't actually talk to the real databases, just  write
> a trivial pretend database (they're often called mocks) with the  same
> function signatures and header names and so on so that you can  build your
> test program with it instead of with pgsql or mysql.  (Trivial so that the
> mock database doesn't need to be tested itself.)  Ideally you should do the
> same for sqlite.

I would only recommend this if you find that using (one of the) real DB
backends (sqlite, and against a /dev/shm-based db in particular) for
day-to-day testing is not fast enough.  Maintaining an ad-hoc
persistence backend is a huge PITA … in many systems, though, it's less
of a PITA than a disruptively-long-running testsuite.

-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20090901/04be1347/attachment.bin>


More information about the gnucash-devel mailing list