We've all heard of writing unit tests for code and business logic, but what happens when that logic is inside SQL server?
With Visual Studio, you can write database unit tests. These are useful for testing out:
- Stored Procedures
- Triggers
- User-defined functions
- Views
These tests can also be added to the same library as your unit, web and load tests.
If you want to know how to setup database unit tests locally and in your build pipeline, check out this article: Unit Test Stored Procedures and Automate Build, Deploy, Test Azure SQL Database Changes with CI/CD Pipelines