DbFit

DbFit is a free, open-source framework for writing unit and integration tests for database code. It uses table-based tests, which its project describes as more readable than xUnit-style tests. Test types in the documentation include unit, data-diff, invariant, schema and timing tests. Tests can be written in Excel or another spreadsheet program and copied into FitNesse as tab-separated tables. They can run from the command line, a Java IDE or a CI build tool. DbFit is built on FitNesse, which supplies a test framework, HTTP server and wiki editing interface. Listed database support spans Oracle, SQL Server, MySQL, Postgres, Derby, HSQLDB, Sybase, DB2, Teradata, Netezza and Informix across Java and FitSharp implementations. DbFit requires the Java Runtime Environment; its guide starts FitNesse locally for browser-based authoring and execution. Row comparison is intended for datasets under 10K rows, with larger comparisons recommended in the database. SQL Server and Teradata JDBC drivers must be obtained and installed separately.

Who it is for

DbFit suits developers who want table-based unit and integration tests for database code and can work with a local FitNesse setup. It may also fit teams running tests from a Java IDE, command line or CI build tool.

What is good

  • Free and open source under the GPL license.
  • Supports multiple database test types.
  • Tests can be authored in spreadsheets.
  • Tests can run from a CI build tool.
  • Lists support across Java and FitSharp implementations.

What to know first

  • Requires the Java Runtime Environment.
  • SQL Server and Teradata drivers must be installed separately.
  • Row comparison is suited to datasets under 10K rows.
  • Quick procedures have inaccurate timing tests due to 1–2 seconds overhead.

Verdict

DbFit offers table-based database tests through FitNesse, with several test types and execution options. Readers should account for its Java requirement, separately installed drivers and documented limits on row comparison and timing tests.

Compared on integration testing tools

Free plan
Yes

Best DbFit alternatives

See all 12