BT

Test-Driven Database Development with DbFit

by Kurt Christensen on Mar 01, 2007 |
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.

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

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT