https://github.com/database-rider/dbunit-addon
https://github.com/database-rider/dbunit-addon
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/database-rider/dbunit-addon
- Owner: database-rider
- Created: 2016-09-22T21:23:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T23:15:46.000Z (over 4 years ago)
- Last Synced: 2025-01-13T16:48:21.881Z (over 1 year ago)
- Language: Java
- Size: 112 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.asciidoc
Awesome Lists containing this project
README
= DBUnit Addon
:doctype: book
:toc: preamble
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
Exports DBUnit datasets based on a database connection.
This addon brings https://github.com/database-rider/database-rider#export-datasets[Database rider exporter^] to your IDE via JBoss Forge.
image:https://travis-ci.org/database-rider/dbunit-addon.svg[Build Status (Travis CI), link=https://travis-ci.org/database-rider/dbunit-addon]
image:https://coveralls.io/repos/database-rider/dbunit-addon/badge.svg?branch=master&service=github[Coverage, link=https://coveralls.io/r/database-rider/dbunit-addon]
== Installation
Use install addon from git command:
----
addon-install-from-git --url https://github.com/database-rider/dbunit-addon.git
----
Or install from Forge catalog:
image::install-from-catalog.png["Install from catalog"]
== Usage
. Setup database connection
+
image::setup_cmd.png["Setup command"]
. Export database tables into *YAML*, *JSON*, *XML*, *XLS* and *CSV* datasets.
+
image::export_cmd.png["Export command"]
== Export configuration
* `Format`: Dataset format.
* `Include tables`: Name of tables to include in generated dataset. If empty all tables will be exported.
* `Dependent tables`: If true will bring dependent included tables. Works in conjunction with `includeTables`.
* `Query list`: A list of SQL statements which resulting rows will be used in generated dataset.
* `Output dir`: directory to generate dataset.
* `Name`: name of resulting dataset. Format can be ommited in dataset name.
== Oracle database
As oracle jdbc driver is not on maven central the plugin doesn't come with it on classpath hence it cannot connect to Oracle DB by default.
In order to make the plugin work with oracle will you need to http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html[download the jdbc driver] and copy to `dbunit-addon folder` located at *user_home/.forge/addons/com-github-database-rider-addon-dbunit-addon-1-0-0-SNAPSHOT*
NOTE: You need to restart Forge after adding the oracle driver.