An Example of Test-Driven Development

  • Andy Leonard (10/29/2010)


    LOL Guru!

    I think Alex is trying to tell me the same thing, although he's being much nicer about it than you!

    :{>

    LOVE your tweet btw! Great minds think alike! 😎

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • del

  • 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

  • This was removed by the editor as SPAM

Viewing 4 posts - 31 through 33 (of 33 total)

You must be logged in to reply to this topic. Login to reply