leocharre has asked for the wisdom of the Perl Monks concerning the following question:
I have some modules that make use of a database. I'm biased towards mysql, but at least for testing purposes, using sqlite is absolutely wonderful.
I'm a sucker for tests. I think it actually speeds up development, a lot.
I have some situations where mysql and sqlite behaviour is different. Where one SQL call is not going to work the same way for both database 'formats' (is that what you call them?)
I want to offer to test both mysql and sqlite.
I noticed for example with DBD::mysql, you need to have a local mysqld server daemon running to install without force.
I also noticed that the tests do not ask what database name, user and password to use.
Is it going behind my back and creating these? And then deleting them? Maybe it's not making any inserts/creates? doubt it..
In my tests that require mysql. Should I prompt the user for a testing database name, user and password? Or should I create those and then delete them? I would probably rather not, it feels intrusive on my code's part.
Is there an established convention for a mysql testing database, like 'guest_database', 'guest_user', 'guest_password' ?
What would be the right thing to do?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Established convention for testing using mysql?
by dsheroh (Monsignor) on Jan 13, 2008 at 08:27 UTC | |
by roboticus (Chancellor) on Jan 13, 2008 at 12:55 UTC | |
|
Re: Established convention for testing using mysql?
by starbolin (Hermit) on Jan 13, 2008 at 07:08 UTC |