Unit testing: What it is and why it is important for T-SQL code!

What is the Unit Test?

What benefits will I get by writing unit tests?

Introduction to tSQLt

  • Tests are performed automatically within transactions; this approach was adopted to keep the tests independent and reduce the work of cleaning any temporary structures used during the tests itself
  • Tests are grouped within a schema, this allows you to better organize your tests and use common configuration methods
  • The output can be in plain text or XML. XML format simplifies the integration with Continuous Integration solutions
  • The framework offers the possibility to create fake tables and fake views as well as “spies” stored procedures. It offers these tools to test the code in isolation




CTO at Centro Software, Microsoft Data Platform MVP

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to sort tuples in Python ?

Honeypot Company Portrait Series: Xempus

Power BI & R Part 2: Running R scripts in Power BI

Making Sense of Stacks with Stacks

Old is gold but new is platinum yet connecting the donative perspect of Java in the world of…


Introducing pyspark_xray: a diagnostic tool that enables local debugging of PySpark applications…

Remote Repository Sync with Macrium Site Manager

Graph algorithms demystified #1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sergio Govoni

Sergio Govoni

CTO at Centro Software, Microsoft Data Platform MVP

More from Medium


Version Controlling & GIT

What is MVC in .NET ?

Why Entity Framework(ORM) is better and more secure.