I am trying to figure out the best way(s) to test Service and DAO layers. So, a few sub questions...
- When testing a service layer, is it best to test against a mock DAO layer or a "live" DAO layer pointed at a testing environment?
- How should SQL in the DAO layer be tested when the only test database is in a shared environment (Oracle/DB2)
- How do you solve the paradox of any DAO writes/updates need to be tested with DAO reads which is something that also has to be tested?
I am looking for any good documentation, articles, or references in this area along with any tools to help automate the process. I already know about JUint for unit testing and Hudson for CI.