in·dom·i·ta·ble
adj.   Incapable of being overcome, subdued, or vanquished; unconquerable.

5th
JAN

SqlTdd Improvements

Posted by indomitablehef | Filed under SqlTdd

I’ve improved the recording and display of Test Results, including the start/end times for each test and maintaining history for test runs. http://code.google.com/p/sqltdd/

22nd
DEC

SqlTdd : Configurable Transaction Rollback Teardown

Posted by indomitablehef | Filed under SqlTdd

I’ve added a new feature to SqlTdd, configurable transaction rollback teardown. By default, all tests in the TestCatalog use transaction rollback teardown, but you can decorate a test with UseTransactionRollbackTeardown = 0, to tell the SqlTdd framework to run that particular test without it. This property is set when you Mark the test procedure for discovery, using the [SqlTdd.Util].MarkTestMethod procedure.

I plan to tackle Test Suite Setup and Teardown next.

15th
DEC

SqlTdd 0.1 Released

Posted by indomitablehef | Filed under SqlTdd

SqlTdd 0.1 is now available at http://code.google.com/p/sqltdd. More features are on their way. I’d very much appreciate feedback on it.

14th
DEC

The Motivation Behind SqlTdd

Posted by indomitablehef | Filed under SqlTdd, TDD

We software developers have a tendency to turn our noses up at SQL “code”. When we get excited about good design, good sql design is rarely part of the discussion. Likewise, when we talk about Testability, the goal is often to eliminate the database from what we’re testing entirely. I’m all for that, actually, but it’s not the whole story. The reality is that SQL Stored Procedures, functions, and other programming constructs is often the “right place” to implement some piece of functionality. Even when the argument can be made that it’s not, sometimes that’s where it ends up anyway. Sometimes, that’s the skillset you have available, so that what you do. It’s “the hammer” antipattern:

When all you have is a hammer, everything looks like a nail.

But calling it an anti-pattern isn’t enough. There’s a lot of working code out there, written entirely in SQL. There are a lot of capable SQL developers out there, and they’re mostly being ignored by the part of the industry that cares about testabilty, agility, and refactoring.

SqlTdd isn’t the first unit testing framework for SQL Server, but it’s my attempt to build a better one. Here are some of my design goals

  1. A capable SQL devloper should be able to use it without ever needing to leave SQL Server Management Studio - i.e., entirely in SQL, as far as he’s concerned
  2. It should lend itself well to the use of “Tests as Documentation”, and generally more readable SQL Code
  3. It should integrate well with existing automated build and continuous integration tools used in traditional Test Driven Development
  4. It should enable sophisticated testing techniques, such as custom assertions, transaction rollback teardown, Test Suites, setup/teardown, and even mocks and stubs.

13th
DEC

SqlTdd 0.1 to drop on Monday

Posted by indomitablehef | Filed under SqlTdd

SqlTdd is a unit testing framework for SqlServer 2005/2008, and I’m working hard to get it ready to post on google code on Monday. Stay tuned.