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.
Community comments
FYI: Fitnesse Testing
by Dan Barber,
Re: FYI: Fitnesse Testing
by Kurt Christensen,
FYI: Fitnesse Testing
by Dan Barber,
Your message is awaiting moderation. Thank you for participating in the discussion.
Just wanted to mention Fitnesse Acceptance Test framework as well.
fitnesse.org/
Re: FYI: Fitnesse Testing
by Kurt Christensen,
Your message is awaiting moderation. Thank you for participating in the discussion.
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.