Testing the deployed integration

After you deploy an integration runtime to the cluster, you can view the underlying definition and then test the integration.

Testing the deployed integration for an event-driven flow

To test the deployed integration for an event-driven flow, you can verify its behavior by performing the event activity that triggers the flow and then checking for the expected results in the UI of the target applications.

Procedure

  1. In the source application, perform the event activity that triggers the flow. For example, if the flow is triggered when Salesforce leads are created, access the Salesforce instance that is linked to the account that you specified (using the Accounts configuration type) while deploying the BAR file. Then create some Salesforce leads.
  2. Check the target applications to verify that you can see the expected results. For example, you can check your Insightly instance to verify that corresponding leads are created.

Testing the deployed integration for an API flow or Toolkit integration

The deployed integration for an API flow exposes a single API and its operations, but a deployed Toolkit integration can expose more than one API (or application) and their associated operations. To test the deployed integration, you can invoke its API operations.

The following instructions describe how to test the deployed integration for an API flow by invoking the API, but the steps for testing a Toolkit integration from the Dashboard are similar.

Procedure

To invoke the API for an API flow, complete the following steps:

  1. From your App Connect Dashboard instance, click the integration runtime tile on the Runtimes page.
    The API tile is displayed, with a status of Started.
    API tile for an integration runtime
  2. To view the API definition, click the API tile.

    On the Documentation tab, the Overview section displays the type of API, the protocol, and the base URL for the API endpoint. A Download OpenAPI Document link is also provided for the OpenAPI document that describes the API. If downloaded, the document is saved as a YAML file to the default download location that is configured for your browser. The format of this file name is APIname-version.yaml; for example, Customer_API-0.0.1.yaml.

    Documentation tab for the API

    From the left pane, you can click each API operation that was configured in the flows for the imported API to view its details, which you can then use to test the operation. To the right of the operation's description in the right pane, a tag is provided to identify which model (defined in the API flow) the operation belongs to.

    The following information is displayed for an operation:

    • The HTTP request for the operation.
    • The header parameters in a collapsible section.
    • The body, path, or query parameters with examples, and the schema if relevant, in collapsible sections. The parameters that you see will depend on the operation's settings.
      HTTP request and parameters for an API operation
    • Tooling languages that can be used when making the request, and a code sample for calling the operation in the selected language.
    • Response codes for the operation, and the response body schema with an example.
      Sample requests in tooling languages, and responses for an API operation

    You can also click Definitions in the left pane and expand the sections to view the schema definition for each of the API's models, and an example with sample values.

    API model definitions
  3. To test any of the API operations, click the operation and then click the Try it tab.
    This example shows how to test the following GET operation to retrieve the details of a customer contact in Salesforce by using a unique contact ID. The Details tab indicates that a Customer ID is required.
    HTTP request and parameters for a sample GET operation

    From the Try it tab, specify the ID of an existing Salesforce contact in the CustomerID field. (Although it is possible to use the Generate link to generate a sample value, using this value in a test would not yield successful results for a GET operation because the Customer ID needs to be for an actual Salesforce contact.)

    Completed try tab for a sample GET operation

    Click Send to invoke the GET operation for the API and then check the request and the response that are displayed.

    For our GET example, the Response section displays the success code that is returned (200 OK), the headers, and the contact details that were retrieved from Salesforce for the specified CustomerID value.

    Sample response for an API call
  4. If relevant for the operation, check for the expected results in the target applications.

    For our GET example, we can verify that the details retrieved pertain to a contact that exists in our Salesforce instance. Notice that the contact ID in the URL for the Salesforce record is identical to the CustomerID value that was specified for testing.

    Sample response for an API call