Effective test-driven database development

room: Sheraton Hall B, LC — time: Thursday 16:00-17:30
Average Rating: -

Test-driven development is now considered common sense in the OO world, but it is often not applied to database code. This session looks at the reasons why teams struggle with database test coverage and presents solutions and best practices for test-driven database development, from unit-testing stored procedures to Java/.NET integration tests that involve a database. We also present DbFit, an extension to FIT/FitNesse that makes database TDD easy, and discuss a case study of migrating database testing to this model at Edfinancial Services, a student loan servicing company.

(break here for the program guide)

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 (25 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

Part III: Database testing case study - migrating to DbFit in EdFinancial (25 mins)

  • Problem we needed to solve
  • Examples of bad integration tests
  • How DbFit helped
  • Best Practices and lessons learned
    • Creating and Organizing Integration Tests
    • Coordinating work for multiple teams
    • Running tests on various test/staging servers
    • Frequent database changes

Part IV: Q & A (10 mins)

The session will be presented by Gojko Adzic from Neuri Ltd and Marisa Seal from EdFinancial. Gojko is the author of DbFit. Marisa is one of the most active members of the DbFit community.

Process/Mechanics

interactive presentation