Today I had an idea of writing a unit testing framework for stored procedures in MySQL. The full idea is written on a recent post on my blog. In short it goes like this: I want to automate my procedure testing, I want to use a standardized way to test my procedures. Unit testing is widely documented, and there are a zillion XUnit frameworks out there, why not write one for MySQL (or any other database). It would be open source of course. What do you think? It is silly, stupid, needless or what? Or another idea would be to write a general database framework in SQL. Hmm, I really want to discuss that with someone, collect thoughts and ideas.
There's already one testing framework for Sql Server - TSQLUnit. Maybe you can get some useful info from it.
Yes, great idea. I've been having a fair bit of success with pgTAP. I've used it in a number of projects, both for test driven database development and to write tests for existing procedures in order to be able to effectively refactor them.
I have often been asked if there's something like it for MySQL. Maybe you've written something by now?
There are already unit tests out there. Apart from dbUnit and sqlUnit, try:
MyTAP: https://github.com/hepabolu/mytap
datacharmer.org: http://datacharmer.blogspot.com/2006/01/mysql-5-general-purpose-routine_27.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With