SQLBits 2017

Getting CI right for SQL server

Write SQL unit tests with tSQLt and automate them with VSTS.
It isn’t the dark ages any more.
You’ve learned how to express your database in script form using something like SSDT, Flyway or Redgate. You track those scripts in source control with tools like TFS or Git. Well done.
But you haven’t written as many automated tests as you know you should. You haven’t looked at the build functionality in VSTS or gotten to grips with build servers like TeamCity or Jenkins. Even if you have it was for C# apps and you aren’t sure how to get the same benefits for SQL Server.
I’ll explain how to unit test SQL with tSQLt and to automate your tests with a build server to give you confidence in the quality of your code.