Making tests execute on multiple databases

[prev] [thread] [next] [Date index for 2005/05/04]

From: Jim Brandt
Subject: Making tests execute on multiple databases
Date: 17:58 on 04 May 2005
I've been looking over the CDBI test suite while tracking down some 
strange behavior and it seems all of the tests, except for the mysql 
tests, use SQLite as the database. This is clearly very handy as the 
tests can set up whatever they need to run as long as the module is 
installed.

However, I found I wanted to run the same tests against Oracle. I was 
able to modify some of the Films tests to do this, but it took some 
work. It seems to me it would be really useful to be able to set some 
configuration parameters to run the entire test suite against a 
particular database. So when a new release was available, for example, 
I could give it a connect_string, username, and password of a database 
where the user would have privileges to create tables, etc. Then I 
could run all the tests against Oracle. Other users could run against 
their DBs.

Now I know the point of CDBI is to be database-agnostic. It seems to me 
this approach would make it easier to confirm that changes haven't put 
in something that doesn't work on a particular system.

Any other opinions on this? It doesn't seem it would be that hard to 
do. I'm thinking either custom db_Main subs or environment variables 
would do the trick.

Thanks,
Jim

==========================================
Jim Brandt
Administrative Computing Services
University at Buffalo

Making tests execute on multiple databases
Jim Brandt 17:58 on 04 May 2005

Re: Making tests execute on multiple databases
Matt S Trout 23:34 on 04 May 2005

Re: Making tests execute on multiple databases
Tony Bowden 06:18 on 05 May 2005

Re: Making tests execute on multiple databases
Jim Brandt 11:53 on 05 May 2005

Generated at 11:49 on 06 May 2005 by mariachi v0.52