...
context-name: Anchor context-name context-name
- TODO: Fix link
- Compare to
context-name
in thestage
operation.
...
- An object (key-value pairs).
- These become system properties that become available to the Java class when it is executed.
- TODO: Make this code accessible? There is sample code in the
java-samples
module of theetlunit-specific-examples
project on Bitbucket.
...
- The
java-executor
feature must be configured for your project.- The default file for defining your project's configuration is
etlunit.json
, located in foldersrc/test/resources/config
. - You may also place the configuration information in another file, (e.g.,
java.json
) so that you can run your Java tests in another profile. In this case the profile name would be "java
." TODO: Fix link. SEE the ETLUnit Test Profiles page for more information about profiles.
- The default file for defining your project's configuration is
- At a minimum, your profile configuration file must declare
java-executor
as one of the installed features of your project.
Section | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- TODO: Make this code accessible? There is sample code in the
java-samples
module of theetlunit-specific-examples
project on Bitbucket. - Place your Java source code under folder
src/main/java
. You may use packages if you wish. - ETLUnit will execute a Java class only if it has a
main
method. - When you run a Maven compile or package on your project, binaries for Java classes you wrote will be written to
target/classes
. Package structure will be maintained. - Out-of-the-box, ETLUnit will only be able to find your Java classes when the tests are run by Maven from the command line. Running an ETLUnit test from Maven looks like the following:
...
- If you can recognize it, the test name is preceded by the pound sign ("#"), which is part of the command line syntax to run a test method (contrast this with the syntax to run a test package, a test class, or an operation). Not all special symbols used in the CLI will work in the context of the Maven test command. TODO: Fix link. SEE the ETLUnit CLI page for more information on running tests from the ETLUnit command shell.
- That said, you can run Java classes from the command shell if you manually reconfigure the batch file that starts the command line interface ("CLI").
- There are two batch files that are used to start the shell. They both reside in folder
bin/
under your project root.- Batch file "
etlunit
" will be invoked when your command shell is a Unix-like shell, like BASH. - Batch file "
etlunit.bat
" will be invoked when your command shell is the Windows command shell.
- Batch file "
...
The assert operation's source-reference-file-type property narrows the count of columns that will be compared with the target to just two.
TODO: Make this project accessible? This example is from the sql-database-samples
module of the etlunit-specific-examples
project in Bitbucket.
...
execute()
for Java Executable Example
TODO: Make this code accessible? SEE the java-samples
module of the etlunit-specific-examples
project in Bitbucket.
...