The following tSQLt test checks that a view is not empty. This test is primarily used to check the views that expose data to the end…
Category: Testing
The following tSQLt test checks that all the indexes exist & are enabled as expected: CREATE PROCEDURE testSchema.[test that all indexes exist] AS BEGIN IF…
The following tSQLt test checks the historical unchanging data in a fact table to ensure that it has not been changed unexpectedly as part of…
The following tSQLt test checks the unchanging (or very slowly-changing) data in a dimension or reference table to ensure that it has not been changed…
tSQLt is a great T-SQL based unit testing framework for SQL Server. In addition to using it for unit testing, I’ve recently been (mis)using it…
The following tSQLt test checks that the basic schema of a table (or view) to ensure that it has not been changed unexpectedly as part…
Aim: Automatically run the tSQLt tests from TeamCity following each successful build & deploy. Fortunately, there is a TeamCity runner for tSQLt available at https://github.com/cprieto/tsqlt-teamcity…
Aim: Deploy the tSQLt framework & tests using TeamCity & Octopus Deploy. In production, you may have separate TeamCity, Octopus Server & Tentacle environments. However,…
A note on cross-database testing In my previous post, I outlined how to install tSQLt on a specific test database. To test a database called…
Aim: Include a SQL Server test framework in an existing SSDT project so it can be added to version control & deployed to environments. Set…