SQLBits 2020

Test Driven Development in SQL Server, safer code deploys

Testing data in SQL Server is hard, but it is easier than having to restore your database. This session will show how easy it is to test database code using industry frameworks, tools and processes

Test Driven Development (TDD) is a design approach which has enabled application developers to write cleaner code. It is relevant for database development as it ensures that code produced using TDD and unit tests will be of higher quality which means interactions with data will be safer. TDD is not a new method of unit testing, it is an essential design practice for improving the quality of your deployed code. In this session it will be shown how we can use TDD to design and write better unit tests using open-source frameworks and industry standard tools. These tools can be run within SQL Server Management Studio which means DBAs can also take advantage of TDD and unit test, to ensure more reliable code is deployed to databases. TDD can result in code that can be deployed more reliably and faster when using DevOps processes such as Continuous Integration and Continuous Delivery. A comprehensive DEMO will reveal how Test Driven Development can help you deploy database code safer.