Test Integration Instances

Oracle Integration provides the Oracle Asserter testing framework for recording tests of integration instances and replaying them to reproduce potential issues.

Note:

The Oracle Asserter testing framework has been deprecated.

You can simulate the behavior of both a trigger connection and the response from an invoke connection. You can also export integrations with recordings and import and test the integration in a different environment (for example, move it from a design environment to a test environment). You can also submit recordings to Oracle for analysis of errors.

Oracle Asserter enables you to perform the following:

  • Create a test to run when fixing bugs in an integration. For example, an integration is deployed to production. Later, in the development instance, you change a mapping. If that breaks the integration because it now sends an incorrect message back to the client, Oracle Asserter can catch the regression.

  • Test an integration in isolation of the dependent endpoints. For example, if an integration invokes certain endpoints and those endpoints are not accessible, you can bypass them and simulate the responses.

  • Pass an integration (.iar) file and corresponding recording file to Oracle Support Services so they can reproduce a problem you are having without requiring access to remote endpoints such as SAP or Salesforce. With Oracle Asserter, the endpoints are simulated and not required to reproduce the issue.

  • Ensure that the integration execution works across releases and different environments. You can automate the integration in your own repositories.

Restrictions

Note the following restrictions when using Oracle Asserter.

  • Recording and playback of integration instances is only supported for trigger-based orchestrated integrations. Scheduled orchestrations are not supported.

  • Asserter activations for integrations in which the connectivity agent is used in a trigger connection are not supported.
  • Assertions can fail for integrations with invoke connections inside for-each actions.

  • Playback works fine in reproducing fault instances. However, assertion evaluation times out and the proper results are not displayed in the Oracle Asserter Result dialog.

  • There is a known issue with dynamic functions (for example, with the date function, the playback works for these integrations, but assertion evaluation fails. The results shown in the Oracle Asserter Result dialog are not correct.

  • After the Oracle Asserter is enabled and any integration recording is played back for the first time, all the currently activated integrations stop serving the Swagger URL. To resolve this issue, deactivate and reactive all integrations again.

  • If the total size of request and response payloads for all the invokes combined exceeds 25 MB, the recording is not created.

Record the Instance and Update Instance Details

When design is complete and the integration is ready for production, you can create an asserter test to check into your source repository.

This is because if you want to change the integration later, you can rely on the asserter test to catch regressions (for example, an assertion fails because the response you are sending to the client has changed due to a bug that was introduced in a mapping).

  1. Create an orchestrated integration.

  2. Go to the Integrations page and find the row for the integration.
    1. If the integration is not active, click the Activate icon icon.

    2. Select Enable Asserter Recording in the dialog that is displayed, then click Activate.

      The integration is activated and the endpoint URL is displayed in the banner at the top of the page.

    or
    1. If the integration is already active, select Enable Asserter Recording from the Actions icon menu.

    The following message is displayed:
    Successfully enabled recording for integration integration_name (version).
  3. Invoke the integration to create an instance.

    If your integration includes multiple branches, create integration instances for each branch. For example, assume your integration includes a switch action that routes to one branch if the OrgID value passed is 7 or routes to an Otherwise branch if the OrgID value is not 7. Create two asserter recordings, one with each input value sent.

  4. Select Asserter Recordings from the Actions menu menu. The results are displayed. Each recording is identified by a unique value in the Primary Identifier column. You can create up to twelve recordings for a specific integration. When you create a twelfth recording, the first (oldest) recording you created gets deleted.
    Description of asserter_recordings1.png follows
    Description of the illustration asserter_recordings1.png

  5. Go to the Track Instances page to see the instances.

  6. Go to the row of the instance with the recording.
  7. If you want to update the recording name and description, click Asserter icon.

  8. Make your updates. You can only make these updates from the Track Instances page (and not from the Integrations page).

  9. Click Done.

Play Back the Recorded Instance

You can play back the recorded instance using the same integration data.

  1. Go to the Integrations page or Track Instances page.
    1. On the Integration page, find the integration that includes the recording.
    2. On the Track Instances page, find the integration instance that includes the recording.
  2. Select the following:
    1. If on the Integrations page, select Asserter Recordings from the Actions menu menu.
    2. If on the Track Instances page, select Asserter icon.
  3. Select the row of the instance to replay, and click the Play icon icon.
    Description of asserter_recordings.png follows
    Description of the illustration asserter_recordings.png

    A message is displayed at the top of the page:
    Successfully invoked playback for recording RecordName_number. Please refer to Track Instances page to view the Asserter instance details. 
    
    
  4. Return to the Track Instances page and note the icon shown next to the instance ID.
    A green icon by the word Succeeded in the Status column indicating that a recording was successfully created

Monitor the Results with Assertions

You can monitor the results of integration instances that include assertions.

  1. Select Home > Monitoring > Integrations > Tracking to track instance results and identify the asserter instance from the list of runs. To differentiate instances with asserter recordings from nonasserter recordings, the Instance ID icon icon is displayed in the Instance Id column.

  2. Select the View Details icon to view recording results.
    Description of asserter_view_details.png follows
    Description of the illustration asserter_view_details.png

    The expected payload results are displayed at the top and the actual payload results are displayed below. This shows the input that was stored earlier as part of the recording that was compared against the actual response. If there is a match, the test passes. Otherwise, the test fails. This is an XML comparison and not a string comparison. Therefore, prefix differences are ignored.



    Note:

    Whenever a faulted instance is recorded (that is, the Track Instances page shows the instance as failed) and you perform a playback, the playback works fine in reproducing the fault. However, the assertion evaluation times out and you cannot see the proper results in the Oracle Asserter Result dialog.

Export and Import Integrations with Recordings

You can export and import integrations with recordings using the same export and import capabilities available with all integrations.

  1. Select Export from the Actions menu menu.
  2. Select the Include Asserter Recordings check box when prompted by the dialog.

    Note:

    When you export a package that includes or does not include recordings, the Export Package dialog shows the Include Asserter Recordings checkbox. If selected, the packages are exported with recordings. Otherwise, the recordings are not exported and cannot be imported.
  3. Export the integration.
  4. Go to the instance host on which to import the integration.
  5. On the Integrations page, click Import.
  6. Click Browse to find the integration (iar) file.
  7. Select the Include Asserter Recordings (if any) check box, then click Import.

Delete a Recorded Instance

You can delete a recorded instance from the Integrations page or the Track Instances page.

  1. From the Integrations page:

    1. Go to the row of the integration that includes the recording to delete.
    2. Select Asserter Recordings from the Actions menu menu.

      The Asserter Recordings for integration_name page is displayed.

    3. Find the recording to delete, and click Delete icon.
  2. From the Track Instances page:
    1. Go to the row of the integration instance that includes the recording to delete.
    2. Select Asserter icon.

      The Asserter Recordings for integration_name page is displayed.

    3. Find the recording to delete, and click Delete icon.

Submit a Recording to Oracle Support Services

You can submit a recorded instance to Oracle. This action enables Oracle to play back the instance to reproduce the issue or bug.

  1. On the Integrations page, find the integration that includes the recording to submit to Oracle.

  2. Select Submit Asserter Recordings from the Actions menu menu.

  3. Enter your email address and a description of the recording. Oracle Support Services receives the recording and submits the results of their analysis to the specified email address.