RE: [agileDatabases] DBA ---> agile DBA
3. Testing: this is proving to be something of a problem. Currently
I write manual tests to exercise the OR mapping. The tests are based
on our understanding of how the database will be used. An example -
save,read, update, delete an order and all its related persistence
classes. I'm still uneasy that we have left out as yet unforeseen
ways in which the database will be accessed. On another note: I've
not yet automated these tests as I have not yet got around to
picking up unit testing skills. This is still on my todo
I’d encourage more DB automated unit tests (actually I’d rather have no manual unit tests at all). Manual tests will eventually become a bottle neck when you have many objects to test. Also what will happen when your manual test fails (due to a mistake on the dev side), and other developers already built on top of the broken code?
We developed test cases for persistence of objects to make sure mapping is fine [developer will write code to create the object, which will be saved and re-read from db and compared to the original object]. We also have test cases for queries (to make sure they compile and return the data they are supposed to).
All other tests use stub DB to save build time.
Ahmed M Hassan
Software Developer, ThoughtWorks Inc.
"Good decisions come from experience, experience comes from bad ones"