dbunit:operation

Full name:

org.dbunit:dbunit-maven-plugin:1.2.0:operation

Description:

Execute DbUnit's Database Operation with an external dataset file.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Since version: 1.0.

Required Parameters

Name Type Since Description
driver String 1.0 The class name of the JDBC driver to be used.
format String 1.0 Dataset file format type. Valid types are: flat, xml, csv, and dtd
Default value is: xml.
type String 1.0 Type of Database operation to perform. Supported types are UPDATE, INSERT, DELETE, DELETE_ALL, REFRESH, CLEAN_INSERT, MSSQL_INSERT, MSSQL_REFRESH, MSSQL_CLEAN_INSERT
url String 1.0 The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.

Optional Parameters

Name Type Since Description
caseSensitiveTableNames boolean 1.0 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: false.
combine boolean 1.0 When true, table rows from multiple sources having the same name are combined into one table.
Only relevant when composite is true.
Default value is: false.
composite boolean 1.0 When true, merge all source files into a single composite dataset.
Default value is: false.
dataTypeFactoryName String 1.0 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: org.dbunit.dataset.datatype.DefaultDataTypeFactory.
datatypeWarning boolean 1.0 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: false.
dbconfig Properties 1.0 DB configuration child element to configure DatabaseConfig properties in a generic way. This makes the many attributes/properties in this class obsolete and sets the value directly where it should go into which is the DatabaseConfig.
escapePattern String 1.0 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
metadataHandlerName String 1.0-beta-3 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: org.dbunit.database.DefaultMetadataHandler.
ordered boolean 1.0 Set to true to order tables according to integrity constraints defined in DB.
Default value is: false.
password String 1.0 Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key.
schema String 1.0 The schema name that tables can be found under.
settingsKey String 1.0 Server's id in settings.xml to look up username and password. Default to ${url} if not given.
skip boolean 1.0 Skip the execution when true, very handy when using together with maven.test.skip.
Default value is: false.
skipOracleRecycleBinTables boolean 1.0-beta-2 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: false.
sources File[] 1.0 DataSet files.
src File 1.0 Deprecated. 1.0
supportBatchStatement boolean 1.0 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: false.
transaction boolean 1.0 When true, place the entired operation in one transaction.
Default value is: false.
useQualifiedTableNames boolean 1.0 Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Default value is: false.
username String 1.0 Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key.

Parameter Details

caseSensitiveTableNames:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Be case sensitive when handling tables.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

combine:

When true, table rows from multiple sources having the same name are combined into one table.
Only relevant when composite is true.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

composite:

When true, merge all source files into a single composite dataset.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

dataTypeFactoryName:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Set the DataType factory to add support for non-standard database vendor data types.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • Default: org.dbunit.dataset.datatype.DefaultDataTypeFactory

datatypeWarning:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Enable or disable the warning message displayed when DbUnit encounter an unsupported data type.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

dbconfig:

DB configuration child element to configure DatabaseConfig properties in a generic way. This makes the many attributes/properties in this class obsolete and sets the value directly where it should go into which is the DatabaseConfig.
  • Type: java.util.Properties
  • Since: 1.0
  • Required: No

driver:

The class name of the JDBC driver to be used.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes

escapePattern:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
escapePattern.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

format:

Dataset file format type. Valid types are: flat, xml, csv, and dtd
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes
  • Default: xml

metadataHandlerName:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Class name of metadata handler.
  • Type: java.lang.String
  • Since: 1.0-beta-3
  • Required: No
  • Default: org.dbunit.database.DefaultMetadataHandler

ordered:

Set to true to order tables according to integrity constraints defined in DB.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

password:

Database password. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

schema:

The schema name that tables can be found under.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

settingsKey:

Server's id in settings.xml to look up username and password. Default to ${url} if not given.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No

skip:

Skip the execution when true, very handy when using together with maven.test.skip.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

skipOracleRecycleBinTables:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
skipOracleRecycleBinTables.
  • Type: boolean
  • Since: 1.0-beta-2
  • Required: No
  • Default: false

sources:

DataSet files.
  • Type: java.io.File[]
  • Since: 1.0
  • Required: No

src:

Deprecated. 1.0
DataSet file Please use sources instead.
  • Type: java.io.File
  • Since: 1.0
  • Required: No

supportBatchStatement:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Enable or disable usage of JDBC batched statement by DbUnit.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

transaction:

When true, place the entired operation in one transaction.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

type:

Type of Database operation to perform. Supported types are UPDATE, INSERT, DELETE, DELETE_ALL, REFRESH, CLEAN_INSERT, MSSQL_INSERT, MSSQL_REFRESH, MSSQL_CLEAN_INSERT
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes

url:

The JDBC URL for the database to access, e.g. jdbc:db2:SAMPLE.
  • Type: java.lang.String
  • Since: 1.0
  • Required: Yes

useQualifiedTableNames:

Deprecated. since 1.0 - use the dbconfig attribute and the nested elements for this
Enable or disable multiple schemas support by prefixing table names with the schema name.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

username:

Database username. If not given, it will be looked up through settings.xml's server with ${settingsKey} as key.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No