Testing Java Archives

Java archives normally contain many classes that need to be tested.

To test a Java archive:

  1. In the Workflow bar, click Start Here. The Load File Wizard opens.
  2. Click the Java Archive option button.
  3. 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.
  4. Click Next. The Testing Java Classes dialog box opens.
  5. In the Class text box, type the name of the class to be tested.
  6. Choose the constructor of the class from the Constructor list box.
  7. Click Next. The instance of the class is created and the created object is browsed for the methods it includes.
  8. In the Method Invocation dialog box, select the toString method.
  9. Click Next.
  10. 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.