Developers have unit tested their code "for ages". But database developers not so much. With tSQLt we have a good framework to implement unit tests for our database code and our database schema.
Once we get used to working with tSQLt, we might be ready to adapt Test Driven Development (TDD) for our database development, but in this presentation, I will focus on just getting started with unit testing.
I will present an overview of tSQLt and demo some basic and some not so basic unit tests for database schema and for programmability objects, such as:
- Validate table schema
- Validate scalar values
- How to setup test data for unit tests
- Mocking tables and calls to other programmability objects