SQLBits 2019

Adding unit tests to the database deployment pipeline

This talk will address how to add the unit testing framework tSQLt to the database deployment pipeline. The purpose is to reduce the cost of validate every change in the database with a fully automated pipeline.
Database and application development need to be synchronized in order to provide the proper behavior, otherwise something
will be broken.

Database unit tests can be the contract between database and application. This contract, not only
avoids database breaking the contract with the application, but also ensures
that the database presents an expected behavior.

This talk will address the basic steps to introduce unit testing to SQL (tSQLt a database
unit testing framework), and create a deployment pipeline able to create a test
environment (local machine, database as a service, docker), run tests, create
tests reports and deploy if the build succeeds.

So, the plan it’s to show since how to write the first to add a set of database
tests to the deployment pipeline.