4.0.0org.codehaus.mojodbunit-maven-plugin-exampleMaven DbUnit Plugin - Example1.0-beta-1-SNAPSHOT
This runnable example execises operation, export, and compare goals.
It uses sql-maven-plugin to create database, then have dbunit-maven-plugin
to initialize database with some data, export initial data to an external file,
import the exported dataset file back to database, finally compare database
with orignal dataset file.
svn co http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/example and run "mvn"
testorg.codehaus.mojosql-maven-plugin1.3hsqldbhsqldb1.8.0.7${driver}${url}${username}${password}${maven.test.skip}src/test/data/create-table.sqlcreate-tabletest-compileexecuteorg.codehaus.mojodbunit-maven-plugin@project.version@hsqldbhsqldb1.8.0.7${driver}${url}${username}${password}${maven.test.skip}inserttestoperationINSERT${originalDataSetFile}exporttestexport${exportedDataSetFile}clean-insert-the-exported-datasettestoperationCLEAN_INSERT${exportedDataSetFile}compare-database-with-original-datasettestcompare${originalDataSetFile}compare-table-with-original-datasettestcompare${originalDataSetFile}
person
compare-queries-with-original-datasettestcompare${originalDataSetFile}personselect * from personorg.hsqldb.jdbcDriverjdbc:hsqldb:file:target/testdbsa../../src/test/data/sample-data.xml${project.build.directory}/dbunit/exported-dataset.xml