Java archives normally contain many classes that need to be tested.
To test a Java archive:
In the Workflow bar, click
Start Here.
The
Load File Wizard opens.
Click the
Java Archive option button.
Click
Browse ... to browse for the JAR file that contains the classes to be tested.
For example, load
sampleBasis.jar. This archive is selected by default.
Click
Next.
The
Testing Java Classes dialog box opens.
In the
Class text box, type the name of the class to be tested.
Choose the constructor of the class from the
Constructor list box.
Click
Next.
The instance of the class is created and the created object is browsed for the methods it includes.
In the
Method Invocation dialog box, select the
toString method.
Click
Next.
Choose a test case where
Java Explorer should add the created scenario.
The method
toString returns a string. Therefore,
Java Explorer asks you whether it should store the returned value or discard it.