SQL Test Winners

by Greg M Lucas on 30 November 2012

I did promise to announce the winners of the SQL Test competition I ran recently on this blog.

I would like to thank Carol D for her excellent write up on her experiences. Carol gained a lot from trying her first code kata but especially the discipline of writing tests first for small pieces of functionality at a time.  Steve also made  another good contribution and describes the new experience of using TDD to write SQL.  The other winners were Alex, Arthur and Manoj.  Thanks to all the contributors for making it such an interesting discussion.

{ Comments on this entry are closed }

In Part 11, we delved into mocking stored procedures and explored how to populate output parameters or add a row to a table when faking a procedure. In this post, we will look at views, including writing tests against the views themselves and also how to mock a view that another object under test depends upon.

[click to continue…]

{ Comments on this entry are closed }

Improve Your Database Unit Testing Skills and Win Free Stuff

7 September 2012

As the SQL Developer community grows to embrace the benefits of test-driven development for databases, so the importance of learning to do it properly increases. One way of learning effective TDD is by the use of code kata – short practice sessions that encourage test-first development in baby steps. Thanks to the guys at Red-Gate, […]

Read the full article →

Agile Database Development Training

31 August 2012

I noticed recently that my friends, Dennis Lloyd (blog | twitter) and Sebastian Meine (blog | twitter) are running some one day workshops on TDD and agile practices in SQL to coincide with Red-Gate’s US SQL In the City tour.

Read the full article →

Code Kata for SQL – Toy Story

27 August 2012

Practicing code kata is an established practice in agile shops but many kata are designed with object-oriented languages in mind and do not not always lend themselves to being reproduced in a declarative, set-based language like T-SQL.  So I have created this new kata specifically for SQL. Enjoy…

Read the full article →

Code Kata for SQL – FizzBuzz

2 August 2012

There has been some discussion recently over on the Google Groups discussion forum for tSQLt about practicing code kata in SQL.  One suggestion was to try the time-honored FizzBuzz game and I present here a slightly modified version adapted to work with a non-object oriented, set-based language like SQL.

Read the full article →

T-SQL Tuesday #032 – A Day in the Life of a freelance Development DBA

17 July 2012

This month’s T-SQL Tuesday is hosted by Erin Stellato (blog | twitter) with a theme of “A Day in The Life”. Erin talks about the fact that our job title is often not a real reflection of everything we do, sometimes not even anything we do.  So for this month’s blog party, Erin asks us […]

Read the full article →

Unit Testing Databases with tSQLt Part 11 – using SpyProcedure to control output parameters and other outcomes

12 July 2012

In an earlier post in this series, I introduced tSQLt‘s [SpyProcedure] in a test to prove that one procedure calls another. In this article we delve deeper into mocking stored procedures and explore how to populate output parameters or add a row to a table without any of the intervening complex logic in the procedure […]

Read the full article →

From Hairdresser to DBA – How to start a career in IT

30 June 2012

I left school more years ago than I care to count with minimal qualifications and more or less fell into a career in hairdressing.  I loved what I did for most of my time in that career but by 1999 had achieved everything I wanted to within that industry.  I decided it was time for […]

Read the full article →

T-SQL Tuesday #031 – Logging

12 June 2012

This month’s T-SQL Tuesday is hosted by Aaron Nelson (blog | twitter) with a theme of “logging”.  Although Aaron’s definition of this topic is deliberately broad, I thought I would go with a more typical definition and talk about the approach I use for logging the actions of large multi-step stored procedures.

Read the full article →