Welcome to the DbUnit Wiki!

DbUnit is a JUnit extension (also usable with Ant) targeted for 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.

Note on SLF4j

As of version 2.2.1, DbUnit uses the SLF4J library for logging purposes (See dependencies). This allows DbUnit users to use their favourite logging library (log4j, JCL, etc.).

When using DbUnit, you must therefore download SLF4J and include slf4j-api-*.jar and the implementation library of your choice in the classpath: for example, slf4j-log4j12-*.jar for Log4J, or slf4j-jcl-*.jar for commons-logging. However, make sure there is only one implementation library in your classpath, as failing to do so might cause some issues. Please see the SLF4J website for more details.

DbUnit topics

Database Testing Related topics

  • NDbUnit - A .NET database unit testing framework
  • MockObjects
  • MockTestingVsRealDatabaseTesting?
  • Data Storm A free embedable database viewer that enables you to view data that will be rolled back at the end of the test. Very good for fixing failing tests.
  • Jailer Database Subsetting Tool, extracts data from productive databases and generates flat XML dataset files.

dbUnit 3.0 Planning

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /