Do you test your SQL/HQL/Criteria ?

Posted by 0101 on Programmers See other posts from Programmers or by 0101
Published on 2011-01-02T13:05:14Z Indexed on 2011/01/02 13:58 UTC
Read the original article Hit count: 282

Filed under:
|
|
|
|

Do you test your SQL or SQL generated by your database framework?

There are frameworks like DbUnit that allow you to create real in-memory database and execute real SQL. But its very hard to use(not developer-friendly so to speak), because you need to first prepare test data(and it should not be shared between tests).

P.S. I don't mean mocking database or framework's database methods, but tests that make you 99% sure that your SQL is working even after some hardcore refactoring.

© Programmers or respective owner

Related posts about unit-testing

Related posts about sql