Procedure Test

Use the Procedure Test to test the procedures for a table. This allows you to debug your procedure definitions before deploying your model. For a basic introduction, see the procedure example in the tutorial.

From the Procedure Test dialog box you can access the Debug Procedure dialog box. More information on debugging procedures appears below.

Testing a Procedure

To test a table's procedure(s), you must either be connected to the host and have access to the application the model is based on, or you must load the model in the Host Emulator and connect to it.

To test a procedure, follow these steps:

  1. Load the host application model containing the procedure to test into the Design Tool.
  2. Connect to the host.
  3. Select Procedure Test from the Debug menu to display the Procedure Test dialog box.
  4. Click the down arrow next to Table and select the table containing the procedure you want to test.
  5. Click the down arrow next to Procedure and select the procedure you want to test.
    All filter and data parameters for the selected procedure appear in the Procedure filters box. If the filter is defined as required, a check mark appears in the box to the left of the filter.
  6. In the Value column, enter data for the parameter.
    If a parameter is required, you must enter a value for that parameter.
  7. Click Execute.

The Design Tool will test the procedure. If this is a SELECT procedure, the Design Tool will display the output in the Procedure outputs dialog box. The record count is displayed at the bottom of the dialog box.

If the Terminal window is visible, you will see the Design Tool navigate to the appropriate host screen while it tests the procedure.

Procedure options

Debugging a Procedure

If you experience problems with a procedure used to satisfy an SQL query or you want to fully investigate the behavior of a procedure, you can debug it in the Debug Procedure dialog box.

  1. Click the down arrow next to Table and select the table containing the procedure you want to test.
  2. Click the down arrow next to Procedure and select the procedure you want to test.
    All filters for the selected procedure appear in the Procedure filters box. If the filter is defined as required, a check mark appears in the box to the left of the filter.
  3. In the Value column, enter data to test against the procedure.
    All filters for the selected procedure appear in the Procedure filters box. If the filter is defined as required, a check mark appears in the box to the left of the filter.
  4. Click Debug to open the Debug Procedure dialog box with the procedure displayed.