Explains how to implement a Java Framework test project using
Silk Performer.
Add a new Java Framework script to your project. Within
Silk Performer,
choose
File > New > Java
Framework Scripts (.bdf/.java).
Enter a name for the
Java class, for example
Testclass. Then
Save the
.bdf and
.java templates.
Open the Java class by double clicking it in the
Project tree menu. Implement the desired Java
test code in one or more member functions of the Java class. For example,
public void doFoo() throws
SilkPerformerException. If you prefer, you can open
and modify the Java class in an IDE instead. Note that
Java Explorer
offers powerful scripting functionality.
Modify the BDF file and make sure that the methods of the Java
class are called with correct parameters. Use
JavaSet<Datatype> functions to set the
function parameters. Use
JavaGet<Datatype> functions to retrieve
return values.
Open
Profile settings and configure a Java Virtual
Machine for the test run. If the Java class requires additional Java archives,
add them to the classpath. The project directory is added to the classpath
automatically and does not have to be configured explicitly.
Invoke a Try Script run. The Java and BDL script will then be
compiled automatically.