tSQLt is a testing framework that is designed to help you write repeatable, isolated tests against your database code. In this session we will briefly examine the goals of testing, where it can be used in an automated deployment pipeline, and introduce you to the tSQLt framework. We’ll show you how to design and write tests to enforce standards, check calculations and other DML operations as well as check exception handling. You will see how a real world refactoring task can be tested in a repeatable manner. Learn how you can incrementally write tests that help you build higher quality code and minimize the introduction of errors against your existing objects.
We will examine a variety of tests, including
- Checking table metadata
- Checking function calculation
- Isolating a procedure test from an embedded function
- Checking for error handling
PowerPoint slides:
- SQL Saturday #331 – GetTesting.pptx
- SQL in the City – Get Testing with tSQLt.pptx
- Slideshare: Get Testing with tSQLt
Code: GetTestingtSQLt.zip
Presentations:
- SQL Saturday #331 – Denver
- Denver SQL Server User Group – Sept 2014

