Pergunta

I am having a Database using which we show reports that is group by applying count etc. I just need to have the best unit test framework in place which can help me out in querying the database automatically and verifying the result.

Foi útil?

Solução

You can use DBUnit. It's a good framework for testing Database. You can use it along with JUnit, but since they are related to DB, they are often not considered Unit tests anymore. There are a lot of tutorials there.

Another thing is that if you use Spring Framework and Hibernate, you can wire your DAO and creating test cases without DBUnit. It may be beneficial if you are working with legacy database and have difficulties creating the data samples.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top