Adding an invocation

You can add an invocation to a new stored procedure.

Procedure

  1. Click the plus button on the Invocations toolbar.

    A new invocation is displayed under Outbound.

  2. Select the new invocation and click the Spreadsheet button on the Invocations toolbar. Alternatively, double-click the new invocation.

    The spreadsheet application (if any) associated with HCL DevOps Test Integrations and APIs (Test Integrations and APIs) is displayed.

  3. In the spreadsheet, add an inbound parameters worksheet, an outbound parameter worksheet, and one or more result set worksheets (format of worksheet names: Result Set 1, Result Set 2, and so on). Each worksheet must have one or more columns.
  4. Save and close the spreadsheet.
  5. Click Finish to close the Edit Database Stub wizard.
  6. Optional: Select the Default response check box if you want a specific invocation to provide the default response for the currently selected stored procedure.
    Note: A stored procedure can have only one default response.
  7. Before running the currently selected database stub with the new stored procedure, you need to use the options button on the Stored Procedures tab to determine matched and unmatched invocation behavior.

    The following table outlines how the options button operate.

    If matched invocation behaviour is... And unmatched invocation behaviour is... Then...

    First match

    Raise exception

    If the input parameters that the application uses match any of the invocations stored in the stub, the first matching invocation is returned.

    Alternatively, if there are no matching invocations in the stub, a SQL exception is returned to the application.

    First match

    Return to the application

    If the input parameters that the application uses match any of the invocations stored in the stub, the first matching invocation is returned.

    Alternatively, if there are no matching invocations in the stub, the stored procedure call returns to the application without raising an SQL exception.

    Replay (that is, next match)

    Raise exception

    For matched invocations (for example, where there is one (or more) invocation(s) within the stub that match), while the application continues to call the stub, those invocations are returned in turn. After those invocations are exhausted, the call is treated as an unmatched invocation.

    Alternatively, if there are no matching invocations in the stub, an SQL exception will be returned to the application.

    Replay (that is, next match)

    Return to the application

    For matched invocations, if Replay is selected and repeated calls exhaust the set of invocations, the call is treated as an unmatched invocation.

    Alternatively, if there are no matching invocations in the stub, the stored procedure call will return to the application without raising an SQL exception.

    Note: The invocation behavior options on the Summary tab determine the default option buttons on the Stored Procedures tab.