Registry / testing / dbunit

dbunit

JSON →
library3.0.0javamavenunverified

JUnit extension for database-driven projects to put databases into a known state between test runs.

<dependency> <groupId>org.dbunit</groupId> <artifactId>dbunit</artifactId> <version>3.0.0</version> </dependency>
INSTALL
IMPORT
SIG · DBUNIT
D
dbunit
testingjavav3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Assertion
org.dbunit.Assertion

Compares expected and actual database datasets using dbUnit.

import org.dbunit.Assertion; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; public class DbUnitTest { public void testDatabaseState() throws Exception { IDataSet expected = new FlatXmlDataSetBuilder().build(getClass().getResourceAsStream("/expected.xml")); IDataSet actual = getConnection().createDataSet(); Assertion.assertEquals(expected, actual); } }
Debug
Known issues
breakingdbUnit 3.0.0 may have breaking changes from 2.x versions, especially in dataset handling.
fix
Review migration guide and update dataset XML files accordingly.
affects: >=3.0.0
Upgrade
Version history
3.0.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources
dbunit — mvn dependency:get dbunit · libregistry