User Guide

ETLUnit 3.9.6

 

Draft in Progress

This document is a draft and is under development.

 

What is ETLUnit?

ETLUnit is open source, unit testing software for ETL ("Extract, Transform and Load") related applications.  At this writing it may be used to write tests for a number of databases and platforms:

ETLUnit is used in the context of Maven projects, and Maven serves to manage the development lifecycle.

The ETLUnit Project

When you first download an ETLUnit project to work on, you most likely will have only source code.  Through the use of Velocity templates, ETLUnit will "flesh out" into an operating testing environment when you package the project with the Maven package command.  Once that is done, three top level folders are added to your project.

  1. bin/
    1. Contains the executables to get ETLUnit shell started.
  2. lib/
    1. Some project dependencies (read, "jar files") reside here.
  3. target/
    1. Some of the Java classes needed by ETLUnit to run are generated here.
    2. The target folder is where the user can browse if he wants to dig deeper into test results.

The ETLUnit Test Class

Writing ETLUnit tests involves creating and editing "test classes."  This concept may, when you see the code, appear loosely like an object-oriented language.

  • There are source files that contain the source code for your tests.
  • Each source file contains:
    • One or more test classes.
    • Annotations (strings that start with the "@" symbol).
    • Test methods.  These always reside inside a test class.
    • Test operations.  These always reside inside a test method.  They have names like set, stage, execute, assert and assert-log.

All clear?  It's a hierarchy that looks like this.

  • Test source file
    • Annotations
    • Test Classes
      • Test methods
        • Test operations

The Command Line Interface (CLI)

Actual tests are initiated from the command line interface (CLI) packaged with ETLUnit.

The CLI shell supports Windows and Unix flavor environments.

Type "help" on the command line and you will see a list of available commands.

The Manual

See the pages below for more information.