Reputation: 8671
Is there any testing framework for Data access tier? I'm using mysql DB.
Upvotes: 0
Views: 175
Reputation: 33092
Why do you need a database test tool?
Use your services (or DAOs) to populate the database. Otherwise you're going to duplicate your fixture state in your tests and your domain logic in your fixtures. This will result in worse maintainability (most notably readability).
If you get weary of inventing test data think about tools like Quickcheck (there are ports for all major languages).
Upvotes: 0
Reputation: 83264
If you are using ORM ( such as Hibernate), then the testing for DAL is easy. All you have to do, is to specify a test config involving in memory sqlite database and then executing all your DAL tests against the sqlite. Of course you need to do a proper data population, schema definition in the first place.
Dbunit will help you here.
Upvotes: 1