StreamBase JUnit Test Utility — runs a StreamBase JUnit test defined in a Java JUnit class


sbunit [[-Jjvm-option]] {-f config | --config config} {class}


sbunit runs a StreamBase JUnit Test for a StreamBase module, where the test is defined in a JUnit Java test class. You must specify class as a fully qualified Java path. You must specify a server configuration file, usually with the .sbconf extension.

The server configuration file must have the following minimum setting:

A <dir> child element of the <java-vm> element, specifying the path to the package directory containing the test class. For test classes developed in StreamBase Studio, the package directory is usually the java-bin folder of the project folder in your Studio workspace.

The application to run is specified in the loadApp() method in the test class.

The following provides an example of the minimum server configuration file required for use with sbunit:

<?xml version="1.0" encoding="UTF-8"?>
<streambase-configuration xmlns:xi=""
    <dir path="./java-bin"/>


-h, --help

Displays usage text.

-f config-file, --config config-file

Specifies a StreamBase Server configuration file (.sbconf file) to use when running the test, which must contain the path to the directory containing your JUnit test class file (which is usually the java-bin folder of the Studio workspace). Alternatively, specify the config file in the Java system property streambase.unit-test.server-conf or in the environment variable STREAMBASE_UNIT_TEST_SERVER_CONF.


Specifies a system property setting or other JVM argument to be passed to the JVM that runs this sbunit command. Use this option to specify temporary settings that affect only the current invocation of sbunit. You must specify multiple -J options to specify multiple JVM arguments.

For example, specify -J-Xmx2G. Use the full option syntax for jvm-option that you would use at the Java command line, including the initial hyphen. For example, specify -J-Dstreambase.log-level=2 to increase the log level for this invocation of sbunit.

Your jvm-option argument might require surrounding quotes, depending on the characters it contains and the shell you are using. However, do not use quotes to escape the spaces between separate JVM arguments; instead use separate -J options. For example: -J-Xms512M -J-Xmx2G


Prints version information and exits.


Run the JUnit test class BBA_test1 developed in the com.example.sbjunit package in StreamBase Studio:

sbunit -f sbd.sbconf com.example.sbjunit.BBA_test1


sbunit requires at least one StreamBase JUnit Java test file and a server configuration file with minimum settings described above.