Open Source Database Testing Tools

Database testing is one of the areas that might have the smaller number of open source tools. The programming languages have many xUnit tools and mocking frameworks, but this is not the case for databases. This article provides a list of open source tools that can be used to perform unit, load and security testing on several relational and NoSQL databases.

This situation might be the results of the fact that most of the main relational databases are commercial tools that come with an infrastructure already provided by the vendors. The current rise of the NoSQL databases and the many forks that have been created from the original MySQL open source relational database might however change this situation in the future. The tools covered in this article are Database Benchmark, DbUnit, DB Test Driven, HammerDB, NoSQLMap, NoSQLUnit, SeLite, sqlmap and tSQLt.


July 18 2016: added JdbcSlim, ruby-plsql-spec, Tsung, utPLSQL
December 1 2016: added SeLite

Database Benchmark

Database Benchmark is an open source .NET tool designed to stress test databases with large data flows. The application performs two main test scenarios: the insertion of large amount of randomly generated records with sequential or random keys and the read of the inserted records, ordered by their keys. It features advanced data generators, graphic visualization and powerful reporting options.

Target databases: MySQL, SQL Server, PostgreSQL, MongoDB and many others
Web site:


DbFit is an open source database testing framework that supports easy test-driven development of your database code. DbFit is written on top of FitNesse, a mature, fully-featured framework with a large community. Tests are written using tables, making them more readable than xUnit-style tests. You can run them from the command line, any Java IDE or CI build tool.


Target databases: Oracle, SQL Server, MySQL, DB2, PostgreSQL, HSQLDB and Derby.
Web site:


DbUnit is a JUnit extension (also usable with Ant) targeted at database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent way to avoid the myriad of problems that can occur when one test case corrupts the database and causes subsequent tests to fail or exacerbate the damage. DbUnit has the ability to export and import your database data to and from XML datasets. Since version 2.0, DbUnit can also work with very large datasets when used in streaming mode. DbUnit can also help you to verify that your database data match an expected set of values.

Target databases: all JDBC supported databases
Web site:

DB Test Driven

Database test-driven (DBTD) is an open source unit testing framework for database test-driven development (DB-TDD). It utilizes native SQL features, installs directly in to your databases, have small footprint, integrates with build servers for continuous integration capabilities. The SQL Server version provides also a code coverage functionality.

Image source:

Target databases: SQL Server, Oracle
Web site:


HammerDB is an open source database load testing and benchmarking tool. It is automated, multi-threaded and extensible with dynamic scripting support. HammerDB includes complete built-in workloads based on industry standard benchmarks as well as capture and replay for the Oracle database.


Image source:

Target databases: Oracle, SQL Server, PostgreSQL, MySQL and others
Web site:


JdbcSlim is the framework to easily integrate database queries and commands into Slim FitNesse testing. The design focuses to keep configuration data, test data and SQL code separate. This ensures that requirements are written independent of the implementation and understandable by business users. JdbcSlim supports all databases for which a jdbc driver exists. It is agnostic of database system specifics and has no code special to any database system. Such things should be handled by the jdbc driver. Nevertheless the jdbc code is segregated from the slim code and adding any driver specific requirements can be done by simply changing a single class.

Target databases: Oracle, SQL Server, PostgreSQL, MySQL and others
Web site:


NoSQLMap is an open source Python tool designed to audit for as well as automate injection attacks and exploit default configuration weaknesses in NoSQL databases, as well as web applications using NoSQL in order to disclose data from the database. The current project goals are to provide a penetration testing tool to simplify attacks on MongoDB servers and web applications as well as proof of concept attacks to debunk the premise that NoSQL applications are impervious to SQL injection.

Target databases: MongoDB
Web site:


NoSQLUnit is an open source JUnit extension for writing tests of Java applications that use NoSQL databases. The goal of NoSQLUnit is to manage the lifecycle of NoSQL engines. It helps you to maintain the databases under test into known state and standardize the way we write tests for NoSQL applications.

Target databases: MongoDB, Cassandra, HBase, Redis and Neo4j
Web site:


Oracle is an open source tools that allows to unit test PL/SQL with Ruby. It is based on two open source libraries:
* ruby-plsql – Ruby API for calling PL/SQL procedures
* RSpec – Ruby testing (or behavior driven development) framework

Target databases: Oracle
Web site:


SeLite (Selenium + SQLite) is a family of Selenium extensions and frameworks. It improves development interface, facilitates team work, enhances Selenese syntax and API, which increases development efficiency and enables user scripts to be more effective. It enables DB-driven navigation with SQLite. Some application errors cause incorrect data that doesn’t show up on the immediate screens (or not at all during the same session). Such defects present themselves only on subsequent screens or even much later (through their knock-on effect). Having a test database (in SQLite) isolated from the application database facilitates early detection of those bugs.

Target databases: SQLite, MySQL, PostgreSQL
Web site:


sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections.

Target databases: MySQL, Oracle, PostgreSQL, SQL Server, DB2 and more
Web site:


tSQLt is an open source database unit testing framework for Microsoft. tSQLt allows you to implement unit tests in T-SQL. This is important as you do not have to switch between various tools to create your code and your unit tests. Tests are automatically run within transactions which keeps tests independent and reduces any cleanup work you need.

Target databases: SQL Server
Web site:


Tsung is an open-source multi-protocol distributed load testing tool. It can be used to stress HTTP, WebDAV, SOAP, PostgreSQL, MySQL, LDAP and Jabber/XMPP servers. The purpose of Tsung is to simulate users in order to test the scalability and performance of IP based client/server applications. You can use it to do load and stress testing of your servers. Many protocols have been implemented and tested, and it can be easily extended. It can be distributed on several client machines and is able to simulate hundreds of thousands of virtual users concurrently (or even millions if you have enough hardware …). Tsung is developed in Erlang, an open-source language made by Ericsson for building robust fault-tolerant distributed applications.

Target databases: MySQL, PostgreSQL
Web site:


utPLSQL is a versatile open source unit testing framework for Oracle PL/SQL. It allow for automated testing of:
* Packages
* Functions
* Procedures
* Anything that can be execute or observed in PL/SQL such as:

Target databases: Oracle
Web site:

Related Content:

4 Comments on Open Source Database Testing Tools

  1. Another framework to add is JdbcSlim

    JdbcSlim supports all databases which have a jdbc driver.

    It is a plugin for the FitNesse Testing framework. A mature, fully-featured framework with a large community.

    The design focuses to keep configuration data, test data and SQL code separate. This ensures that requirements are written independent of the implementation and understandable by developers, testers and business users.

Leave a Reply

Your email address will not be published.