[TIP] database regression testing

Satchidanand Haridas satchit at zope.com
Wed Apr 9 10:44:28 PDT 2008


While I don't have any specific suggestions for testing SQL, I've a  
question: Does your database layer contain business logic? If not and  
your SQL queries are for mainly for simple CRUD operations, one way  
(that you may have already considered) might be to write a python  
wrapper around your SQL queries and then testing the wrapper using  
python unit-testing framework. It should be possible to test stored  
procedures in this manner as well depending on which database/database- 
adapter you are using. Of course you won't have the benefit of code- 
coverage tools in this case, but you have tests none-the-less, which  
is always good.

Satchit


On Apr 9, 2008, at 10:41 AM, Nate Lowrie wrote:
> I am in the middle of developing a complex business application for a
> client.  I am using an agile approach for development.  I have almost
> completed Iteration 2.  My weak link now is the database.  I want to
> take an agile approach to it, however my knowledge of test tools for
> databases is somewhat limited.  Do we have something similar to
> SQLUnit in Python?  Any recommendations?  I would prefer not to write
> Java if I can avoid it... If we have something that could interface
> with Unittest that would be great.
>
> Nate L.
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

----------
Satchidanand Haridas
Software Engineer
Zope Corporation






More information about the testing-in-python mailing list