22-25 April 2026

Effective test-driven database development

2009

TL; DR

Although test-driven development is now considered common sense in the OO world, it is very rare in database development. This session looks at the reasons behind this and presents solutions and best practices for test-driven database development. Database TDD and testing is analysed from two aspects: unit-testing in the database (stored procedures,views) and integration testing from the object service/web layer down to the database. I also present DbFit, an extension to FIT/FitNesse that makes database TDD easy This session is aimed at database developers, technical architects and Java/.NET developers working on enterprise applications.

Session Details

Part I: Technical challenges and best practices for Database TDD (30 mins)

  • Why database TDD is hard
  • What can we do to make it easier
  • Best practices for stored procedure unit testing
  • Best practices for Java/.NET integration tests that involve a database

Part II: DbFit technical demo (20 mins)

  • Why DbFit succeeded where x-Unit style tools have failed
  • Effectively testing stored procedures
  • managing relational data during a test
  • Using DbFit to prepare data or verify the test results for Java/.NET integration tests
  • Covering legacy code with tests
Q&A (10 mins) This talk was previously presented at the Agile 2008 conference in Toronto.

3 things you'll get out of this session