dbunit-maven-plugin oracle,pom.xml · fengyexjtu/dbunit-maven-plugin-example - Gitee.com

xmlns="http://maven.apache.org/POM/4.0.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

4.0.0

org.codehaus.mojo

dbunit-maven-plugin-example

dbunit-maven-plugin-example

1.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.

git clone https://github.com/mojohaus/dbunit-maven-plugin.git ; cd dbunit-maven-plugin/src/example and run "mvn"

test

org.codehaus.mojo

sql-maven-plugin

1.3

hsqldb

hsqldb

1.8.0.7

${driver}

${url}

${username}

${password}

${maven.test.skip}

src/main/test/data/create-table.sql

create-table

test-compile

execute

org.codehaus.mojo

dbunit-maven-plugin

1.0-SNAPSHOT

hsqldb

hsqldb

1.8.0.7

${driver}

${url}

${username}

${password}

${maven.test.skip}

insert

test

operation

INSERT

${originalDataSetFile}

export

test

export

${exportedDataSetFile}

clean-insert-the-exported-dataset

test

operation

CLEAN_INSERT

${exportedDataSetFile}

compare-database-with-original-dataset

test

compare

${originalDataSetFile}

compare-table-with-original-dataset

test

compare

${originalDataSetFile}

person

compare-queries-with-original-dataset

test

compare

${originalDataSetFile}

person

select * from person

src/main/resources

src/main/test/data

**.sql

src/main/test/data

**.xml

org.hsqldb.jdbcDriver

jdbc:hsqldb:file:target/testdb

sa

src/main/test/data/sample-data.xml

${project.build.directory}/dbunit/exported-dataset.xml

UTF-8

UTF-8

UTF-8

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值