Session

How to support SQL Unit Testing with tSQLt, SSDT, and Azure DevOps

Do you use database projects in SQL Server Data Tools (SSDT)? Perhaps you also want to test your database code using a unit test framework?

One of the popular unit testing frameworks for SQL is tSQLt, which allows you to write unit tests in SQL stored procedures that can be used to verify your code correctness. As a framework, it installs a number of supporting objects in a target database, but you don't want to deploy those testing objects to your production database. But you probably do want to keep your unit tests in your source control repository. How can you do this?

This session shows how to use database projects in SQL Server Data Tools (SSDT, or Visual Studio) with Git repos in Azure DevOps to write unit tests using the tSQLt framework. You'll learn how to structure your solution in SSDT to keep the target database, the framework code, and the unit tests separate. You'll also see how to create a DevOps Build pipeline to deploy and execute the unit tests upon check-in to ensure that all unit tests pass before the code changes are committed.

(This session only covers coding unit tests very briefly - it focuses on how to organize your unit testing code and how to deploy and run the unit tests in Azure DevOps.)

If you want to add unit test code to your database project in SSDT, then come to this session to learn the best way how.

Mike Diehl

Director of Data Engineering and Business Intelligence

Winnipeg, Canada

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top