In this article, we are going to learn the basics of SQL unit testing and how to write a SQL unit test through the tSQLt framework.
Read more »SQL unit testing
SQL Database unit testing in Azure Data Studio with tSQLt
April 8, 2021This article talks about unit testing SQL database in Azure Data Studio using the tSQLt testing framework.
Read more »Three ways you can add tSQLt to your SQL database projects
November 10, 2020This article talks about multiple ways to install tSQLt for SQL unit testing database projects managed through SQL Server Data Tools (SSDT).
Read more »Test-driven database hotfix development (TDHD) with SQL unit test based framework (tSQLt)
August 24, 2020This article talks about test-driven database hotfix development using a very productive database testing framework called tSQLt applying the same SQL unit test based approach.
Read more »Using tSQLt for Test-Driven Data Warehouse Development (TDWD)
May 21, 2020This is the second part of a conceptual article for data professionals and enthusiasts interested to work on a test-driven data warehouse development concept by using tSQLt an industry recognized SQL unit testing framework.
Read more »The Concept of Test-Driven Data Warehouse Development (TDWD) with tSQLt
May 7, 2020This is a conceptual article consisting of two parts with enough supported material for any data professional or enthusiast with databases or data warehouse development background willing to go a step ahead by using an industry-recognized SQL unit testing framework called tSQLt.
Read more »SQL Unit Testing Data Warehouse Extracts with tSQLt
January 7, 2020This article talks about basic concepts of SQL unit testing from a Data Warehouse point of view using tSQLt, a highly productive and acclaimed SQL unit testing framework.
Read more »Creating SQL Unit Testing Utility Procedures with tSQLt
September 10, 2019This article gives hands-on experience of writing basic utility procedures and creating their SQL unit tests using tSQLt an advanced SQL unit testing framework.
Read more »Three Standard SQL Unit Tests you can write against any Stored Procedure
June 14, 2019This article talks about the three standard SQL unit tests which can be written against any stored procedure ultimately becoming SQL unit testing object to meet internal or external business specification.
Why you should cleverly name Database Objects for SQL Unit Testing
May 29, 2019This article is focussed on clever database object naming from both development and SQL unit testing point of view.
This article also highlights the importance of naming database objects going through different development transitions including the SQL unit testing phase due to the agile nature of requirements.
Read more »SQL Unit Testing: Working with exceptions
May 21, 2019With this article, we will complete our journey with SQL Unit Testing. But first, let’s remember the main theme of the SQL Unit Testing again briefly. With the help of the SQL Unit Testing, we can detect and find out the flaws and bugs in database projects. This reduces the possible loss of time and money and reputation during the use of the product. However, it should be kept in mind that no matter how many tests are carried out, there will still be some bugs in the project, but SQL unit tests provide a greater degree of confidence. The fact that there are no bugs or flaws in the application at that time does not mean that the application is perfect. We cannot test all combinations and probabilities of the database objects. That is why in real life, considering certain parameters (risk, priority, etc.) we must ensure that a “reasonably sufficient” test is done.
Read more »SQL Unit Testing Mocking Stored Procedures
May 8, 2019In this SQL Unit testing article, we will continue our journey with SQL unit testing. In the previous articles of this series (see the TOC at the bottom), we mentioned about SQL unit testing essentials and designing approaches as well and then we reinforce these notions with various tSQLt framework practical examples. In this article, we will continue to learn how to mock stored procedures in the tSQLt framework and we will provide it with two examples.
Read more »10 Most Common SQL Unit Testing Mistakes
May 7, 2019This SQL unit testing article is based on the fact that we often learn from the mistakes so the idea is to highlight the mistakes to understand them clearly so that they can be avoided straight away.
Read more »How to use fake functions with SQL unit testing?
April 30, 2019In this article series, we are exploring SQL unit testing, in general, and also we are reinforcing details and topics with various practical examples. We are using the tSQLt framework because it is the quite powerful and handy tool in order to develop and code SQL unit tests.
Read more »How to use fake tables in SQL unit testing?
April 22, 2019In this article on SQL unit testing, we will talk about how to isolate SQL unit tests from dependencies and how to use fake tables in SQL unit tests, so that we will able to develop more robust and less fragile SQL unit tests.
Read more »Fundamentals of Test-Driven Database Development (TDDD) with tSQLt unit testing
April 19, 2019This article talks about core concepts of test-driven database development followed by creating simple SQL unit tests with tSQLt based on this approach.
Read more »SQL unit testing best practices
April 8, 2019SQL unit testing is a testing method which allows us to test the smallest, atomic programmable part of a database object. SQL unit testing plays a key role in the modern database development cycle because it allows us to test individual parts of the database objects work as expected. SQL unit testing adds a great worth to the database project because unit tests are more reliable then manual test methods.
Read more »Conventional SQL Unit Testing with tSQLt in Simple Words
March 28, 2019This article is about basics of conventional SQL unit testing concepts and its implementation through tSQLt, a highly acclaimed SQL unit testing framework because of being written in T-SQL and its built-in design support for SQL SQL unit testing needs ranging from simple to complex scenarios.
SQL Unit testing with the tSQLt framework and SQL Server Database Project integration
March 25, 2019In the previous article SQL unit testing with the tSQLt framework for beginners in this series, we covered tSQLt framework essentials and installation. we also demonstrated basic SQL unit testing through the tSQLt framework. In this article, we will continue to explore SQL unit testing and we will also discuss the benefits of SQL unit testing. Additionally, we will learn how we can use the tSQLt framework in a SQL Server Database Project.
Read more »SQL unit testing with the tSQLt framework for beginners
March 18, 2019tSQLt is a powerful, open source framework for SQL Server unit testing. In this article, we will mainly focus on how to create and run SQL unit testing with help of the tSQLt framework. Before we begin to learn tSQLt framework details, let’s discuss essentials and importance of the database unit testing approach, in general. SQL unit testing is a vital and inseparable part of the modern database development approach and it makes possible to prevent errors before producing the release deployment process. Some database developers are still discussing the needs of the SQL unit testing concept; however, database unit testing is very significant to control and check the behavior of the individual parts of the database. For this reason, we cannot ignore the need to write unit test cases.
Read more »tSQLt – A Forgotten Treasure in Database Unit Testing
March 12, 2019This article is an overview of tSQLt, which is one of the best SQL unit testing frameworks, due to number of reasons, including the ease of writing unit tests in the same language (T-SQL) in which the database objects themselves are written.
Read more »SQL Unit Testing with SSDT (SQL Server Data Tools)
February 12, 2019In this article, we will discuss the essentials of the SQL unit testing and then we will explore how to apply SQL unit testing methodology in Azure SQL Database with help of SQL Server Data Tools (SSDT). In particular, this article will focus about unit test theory in terms of SQL Server database development aspect and illustrate SQL unit testing with a detailed example.
Read more »Review of SQL Cop for SQL unit testing
September 29, 2017SQL unit testing is rising in popularity amongst database developers. The importance of Code Quality in Software Development has increased over the period of time. Everyone wants to follow coding standards and write clean code. However, to timely deliver a product to Business we end up in violating design principles, writing fewer unit tests, increasing code complexity and breaching best practices. This increases the overall Technical Debt of the application and has the potential to halt future development work by creating unplanned work.
Read more »SQL Unit testing with SQL Server Data Tools
October 16, 2014This article on SQL Unit Testing is the second part on the series about SSDT and database development
Part I: Continuous integration with SQL Server Data Tools and Team Foundation Server
Introduction
In December 2012, a great addition was made to SSDT: The ability to do SQL unit testing.
Read more »