since the dao layer methods will be dependent on data in the database,
in complex systems some operations will depend on lots of tables,
in this way unit test are not repeatable and independent,
i’m wondering how good TDD layers do this? thx.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A testing framework like DbUnit is exactly what you want. From their site:
DbUnit also supports a variety of RDBMS’s but I might recommend something like HSQLDB, which can be embedded into your project/tests so your unit tests aren’t dependent on being able to connect to a database somewhere in your company’s basement. 🙂 Although, on the other hand, you will be testing using a different RDBMS than you would be using in a production environment…