A
Adam Akhtar
How does one go around creating unit tests for database tables during
developement. Is there a rock solid work flow plan that everyone uses.
Im new to dbs and relatively so with unit tests. I have my project and
it usually starts with a rough idea of what fields need to be in the
table. As i code away items in the db change so it makes it difficult to
write unit tests that will withstand these changes.
I know i need a test version of a database with static items but what id
like to do is for this test version to always reflect whats happening in
the development one. So if I add a field in the development one, the
test one gets one too.
I could just go and code this and probably get something that works but
is probably ugly. I dont like to reinvent the wheel, a bad one at that
so if anyone has some tips or pointers in the right direction id really
appreciate it.
This is for small projects so it doesnt have to industrial strength
bullet proof ninja stuff, small but elegant will be good enough
developement. Is there a rock solid work flow plan that everyone uses.
Im new to dbs and relatively so with unit tests. I have my project and
it usually starts with a rough idea of what fields need to be in the
table. As i code away items in the db change so it makes it difficult to
write unit tests that will withstand these changes.
I know i need a test version of a database with static items but what id
like to do is for this test version to always reflect whats happening in
the development one. So if I add a field in the development one, the
test one gets one too.
I could just go and code this and probably get something that works but
is probably ugly. I dont like to reinvent the wheel, a bad one at that
so if anyone has some tips or pointers in the right direction id really
appreciate it.
This is for small projects so it doesnt have to industrial strength
bullet proof ninja stuff, small but elegant will be good enough