Automated testing is a good software engineering principle regardless of which development management process being used, Scrum, TDD, XP, etc. You know all about the benefits of unit-testing. It will reduce the number of defects, catch bugs earlier, unicorns will manifest themselves and bring you a beer. Great! But how do you start?
There are various opinions on how to test your Data Access Layer (DAL). Some would argue that it makes sense to write tests that run against an actual database. Others will argue that DAL tests should be mocked. While, I’ve talked previously about techniques for unit-testing, advocating, pleading, begging for the usage of mocked dependencies (using a mocking framework). When it comes to testing the DAL, this is where I make an exception to that guidance.
No comments:
Post a Comment