creating dummy databases
Posted: Mon Nov 06, 2006 2:51 am
Hi all.
I am making this application using relatively big DB...meaning lots of tables and stuff.
When I test some methods in my classes...for example if something is created or whatever...I check in the DB to see if there is record and the values are correct. that is how I assure my method works good.
The thing is....I want to make it possible so my test cases create dummy detabase with all tables and all required...and when finished drop it (you know..return to same state after test).
The reason for this would be that I will be able to run the tests on live environment (not deleting any live data...or interfereing with it).
Well...the problem that comes here...how you set priviliges and all to crete the database and everything. Or is maybe database created in advance...and just tables are recreated droped.
Thanks...hope what I said make some sense
I am making this application using relatively big DB...meaning lots of tables and stuff.
When I test some methods in my classes...for example if something is created or whatever...I check in the DB to see if there is record and the values are correct. that is how I assure my method works good.
The thing is....I want to make it possible so my test cases create dummy detabase with all tables and all required...and when finished drop it (you know..return to same state after test).
The reason for this would be that I will be able to run the tests on live environment (not deleting any live data...or interfereing with it).
Well...the problem that comes here...how you set priviliges and all to crete the database and everything. Or is maybe database created in advance...and just tables are recreated droped.
Thanks...hope what I said make some sense