MyGroup JUnitScript
 
   

Bean Scripting Framework Languages

printer
print-friendly
PDF

Extensions Available to BSF Languages

For script languages that are not specially handled (currently only Javascript and BeanShell are given special consideration), a number of simple facilities are provided to simplify testing. These are described below.

args

An array of command line arguments is bound to a bean named args. If no command line arguments are used then the array will have length 0. The elements of the array are all strings.

junit

A bean is provided by the name of junit. This bean is an instance of the class com.hjl.junit.Check . It provides the standard JUnit assertXXX methods and additional methods besides. All the methods of the class are static. However, they may be easier to access from a bean.

For a complete list of methods see the javadoc for the Check class.