So you’ve put your databases in source control and you’re figuring out how to deploy them with VSTS or Octopus Deploy etc. That’s great, but DevOps is about more than just the continuous delivery of software updates. If your new code is broken all you’ve managed to do is ship bugs to your users more quickly than before.
When writing applications we use test frameworks like xUnit or JUnit to create unit tests that can be run on a developers machine or as part of a CI process. That helps us to catch regressions. We should be applying the same diligence to our stored procedures and functions to help us to spot when we accidentally break the database too.
In this session I’ll use tSQLt to create a suite of automated tests and I’ll run them as part of a VSTS build. I’ll share all my scripts on GitHub so you can recreate my demo afterwards on your own machine.