InfoQ

News

Test-Driven Database Development with DbFit

Posted by Kurt Christensen on Mar 01, 2007 06:00 PM

Community
Agile
Topics
Unit Testing
Tags
TDD ,
Database ,
Fit / Fitnesse ,
Oracle
Gojko Adzic has released DbFit, an extension of the Fit testing framework enabling test-driven development against Oracle databases:
DbFit is an extension of the .NET 2.0 Fit test runner which enables Fit/FitNesse tests to execute directly against a database. Version 0.1 supports testing stored procedures and functions, executing queries and statements on Oracle. Support for SQL Server is currently in development (expect it soon).
But why use DbFit to test against the database? Can't the same thing be accomplished with ordinary unit testing frameworks? On reddit.com, Gojko elaborated on the rationale behind DbFit:
After introducing FitNesse into a big .NET project, I found that we were still lacking test-coverage for a lot of DB (legacy) code, and that DB developers have a long feedback loop, so they were not really benefiting from TDD. FitNesse was a good solution because it enabled DB developers to write functional tests much easier than in pl/sql based unit testing libraries, and without getting Java developers involved to write those as JUnit tests. Although FitNesse is typically used for acceptance tests, the combination of FitNesse+DbFit filled the testing gap for our DB code with excellent results, so I wanted to share the library with others.

Note that DbFit currently requires both Java and the .NET 2.0 runtime. Gojko has helpfully provided a DbFit tutorial [pdf] to help new users get up and running.

Related Sponsor

VersionOne is recognized by Agile practitioners as the leader in Agile project management tools. Companies such as Adobe, BBC, CNN, Dow, HP, IBM, Sony and 3M have turned to VersionOne to help deliver greater value to their customers.
FYI: Fitnesse Testing by Dan Barber Posted Mar 2, 2007 12:10 PM
Re: FYI: Fitnesse Testing by Kurt Christensen Posted Mar 2, 2007 12:46 PM
  1. Back to top

    FYI: Fitnesse Testing

    Mar 2, 2007 12:10 PM by Dan Barber

    Just wanted to mention Fitnesse Acceptance Test framework as well. http://fitnesse.org/

  2. Back to top

    Re: FYI: Fitnesse Testing

    Mar 2, 2007 12:46 PM by Kurt Christensen

    Right on - thanks for adding that. Gojko has been helpful in this arena as well; he wrote a really great intro on getting Fit and Fitnesse working for .NET applications.

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.