Show TOC

 Testing MethodsLocate this document in the navigation structure

Use

You can test access to methods of a class using a test object. If the method has no export parameters, the system does not display a result screen.

Prerequisites

You must have instantiated the class you want to test. For more information, see Creating Instances .

Procedure
  1. In the Methods branch of the object display, select the method you want to execute.
  2. Choose the Execute icon to execute the method.

    The appearance of the next screen depends on the method parameter definitions:

    1. If the method has import parameters, they are displayed and you can assign new values to them. The system automatically checks their type. Then choose Execute.
    2. If your entries do not contain errors, the method is called using the parameters you specified. You can also execute the method in debugging mode by choosing Debugging.
    3. For any other parameters, the method is called directly, and a result screen appears containing the runtime.
      Note

      You can debug methods that do not have import parameters by choosing Utilities → Debugging → Switch on debugging.

Result

You have used a test object to test the CALL METHOD statement for a class method.

Note

If the method triggers an exception during the test, the system displays a dialog box containing the exception name and message text.