Data Platform

Adding unit tests with tSQLt to the databases deployment pipeline

Windows B July 21, 2018 9:00 am - 10:00 am

Bookmark and Share

Eduardo Piairo

Any database change is a good candidate for breaking the proper behavior of the system. How to avoid this?

Unit tests at database level can help avoiding breaking the contract with the applications that consume data from the database, and also can help ensuring database correct behavior (for example: a stored procedure do what’s supposed to do, or a specific table indeed exists).

In this talk I will address the basic steps to introduce unit tests at databases using tSQLt. tSQLt is a unit testing framework the allow to write, execute and diagnose tests for T-SQL code. After writing the tests, I will explore how can tests execution be include in the deployment pipeline.