• Hi Andy,

    I really enjoyed this series and I'm always thrilled to see others combining SQL Server and TDD! I was wondering if you've tried using any of the frameworks out there that help with this?

    One of the problems I frequently ran into while TDDing databases is that as the database changes, the tests can become fragile. In other words, adding constraints or renaming columns, or changing data in the database breaks fail pretty quickly. This is okay if the test if very closely related to the change I'm making - in fact I want tests to fail I broke something. But I don't want tests to fail if I changed something irrelevant.

    Anyway, I helped write an open source framework, tSQLt (www.tsqlt.org) which helps alleviate these problems of dependencies by allowing you to fake tables and spy procedures (similar to mocking frameworks in Java). It also allows you to group tests into schemas and has some other neat features. It might be something you want to check out if you like DB TDD!

    Cheers and good luck with the testing!

    -Dennis