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
Database,
Fit / Fitnesse,
Oracle,
TDD
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.

2 comments

Reply

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.

Exclusive Content

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.

Architectures of extraordinarily large, self-sustaining systems

Can a system that is so large it cannot be comprehended be "designed" in a conventional sense? The foundations of computing are about to change. In this talk, Richard P. Gabriel explores why and how.