Database and Analytics

TH15 Unit Testing T-SQL Code

10/19/2017

1:15pm - 2:30pm

Level: Intermediate

Steve Jones

Data Platform MVP, MCSE, BA

Editor

SQLServerCentral

Unit testing has become an integrated, expected part of most software development teams. Many database developers have yet to implement unit testing as a regular habit. This session will look at two-unit testing frameworks and show how to implement tests for common types of non-trivial T-SQL queries. You'll examine the tSQLt framework as well as the Microsoft Unit Testing framework for SQL Server.

You will learn:

  • How to structure and build unit tests for database code with tSQLt
  • How to structure and build unit tests for database code with database projects
  • Understand the challenges of test data and how to solve them