Automated unit testing for database dependent application

Viewed 63

I am working on C++ application which has huge dependency on database. If I need to implement automated unit testing what is the best option?

  1. Insert dummy data in DB which your test function requires and the call test function.
  2. Modular DB operation code and processing code but may not be feasible in legacy code.
  3. Override DB Operation so that specific data can be return instead of actual DB hit; looks complex.
1 Answers
Related