BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Test-Driven Database Development with DbFit

| by Kurt Christensen on Mar 01, 2007. Estimated reading time: 1 minute |
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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

FYI: Fitnesse Testing by Dan Barber

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

Re: FYI: Fitnesse Testing 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.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT