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--configconfig-file-
Specifies a StreamBase Server configuration file (
.sbconffile) to use when running the test, which must contain the path to the directory containing your JUnit test class file (which is usually thejava-binfolder of the Studio workspace). Alternatively, specify the config file in the Java system propertystreambase.unit-test.server-confor in the environment variableSTREAMBASE_UNIT_TEST_SERVER_CONF. -Jjvm-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
-Joptions to specify multiple JVM arguments.For example, specify
-J-Xmx2G. Use the full option syntax forjvm-optionthat you would use at the Java command line, including the initial hyphen. For example, specify-J-Dstreambase.log-level=2to increase the log level for this invocation of sbunit.Your
jvm-optionargument 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-Joptions. For example:-J-Xms512M -J-Xmx2G --version-
Prints version information and exits.
