sbunit
StreamBase JUnit Test Utility — runs a StreamBase JUnit test defined in a Java JUnit class
DESCRIPTION
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="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.streambase.com/schemas/sbconf/"> <java-vm> <dir path="./java-bin"/> </java-vm> </streambase-configuration>
OPTIONS
-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 thejava-bin
folder of the Studio workspace). Alternatively, specify the config file in the Java system propertystreambase.unit-test.server-conf
or in the environment variableSTREAMBASE_UNIT_TEST_SERVER_CONF
. -J
jvm-option
-
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 forjvm-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
--version
-
Prints version information and exits.