Integration testing - Hibernate & DbUnit

Posted by Marco on Stack Overflow See other posts from Stack Overflow or by Marco
Published on 2010-05-03T16:40:33Z Indexed on 2010/05/03 16:48 UTC
Read the original article Hit count: 385

Hi,

I'm writing some integrations tests in JUnit. What happens here is that when i run all the tests together in a row (and not separately), the data persisted in the database always changes and the tests find unexpected data (inserted by the previous test) during their execution.

I was thinking to use DbUnit, but i wonder if it resets the auto-increment index between each execution or not (because the tests also check the IDs of the persisted entities).

Thanks

M.

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about dbunit