Introduction
The BBjUnitTest BBj plug-in is the standalone version of the Eclipse BBjUnitTest plug-in. It is used to develop and run unit tests for your BBj code.
More information about unit tests with BBj can be found here
Prerequisites
This plug-in requires the lib/BBjUnitTest.jar to be added to session's classpath in order to run properly.
Example Usage
- Create a new BBj Session specific classpath called "unittest" (without the quotes)
- Add the BBjUnitTest.jar file from the lib/ folder to the classpath unittest
- Save the classpath
- Open a command prompt
- Execute the following command by replacing the placeholders (<xxx>) by the correct values:
<BBjHome>/bin/BBj.exe -CPunittest -q -WD<PathToProject>/pgms/ <PathToProject>/BBjUnitTest.bbj - TestMathOperations.bbjt
Note: By default the generated results file (saved in the tmp directory by default) will not be overwritten automatically by the plugin, unless you explicitly configured it to do so.
Execution Options
The plug-in has a set of options which can be used to alternate its behavior. The following options can be used:
Name | Description | |
---|---|---|
--f |
Force overwrite | Causes the plugin to overwrite any existing output file without nagging |
--o <File path> |
Output file path | Sets the output file path |
--q |
Quiet Execution | Supresses Exceptions causing the program to continue its execution |
Note: The plugin options should be placed last in the command.