Test Integration Instances

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

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.

  • 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 256 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.

    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 Oracle Asserter > Enable Asserter Recording from the hamburger menumenu.

  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. From the hamburger menu menu, select Oracle Asserter > Recordings. 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 sixth recording, the first (oldest) recording you created gets deleted.
    Description of litmus_result.png follows
    Description of the illustration litmus_result.png

  5. Go to the Tracking page to see the instances.

  6. If you want to update the recording name and description, select Oracle Asserter from the hamburger menu menu.

  7. Make your updates. You can only make these updates from the Tracking page (and not from the Integrations page).

  8. 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 Tracking page.
    1. On the Integration page, find the integration that includes the recording.
    2. On the Tracking page, find the integration instance that includes the recording.
  2. From the hamburger menu menu, select the following:
    1. If on the Integrations page, select Oracle Asserter > Recordings.
    2. If on the Tracking page, select Oracle Asserter.
  3. Select the row of the instance to replay, and click the Play icon.
    Description of litmus_replay.png follows
    Description of the illustration litmus_replay.png

Monitor the Results with Assertions

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

  1. Select Monitoring > Tracking to track instance results and identify the asserter instance from the list of runs. To differentiate asserter runs from nonasserter runs, Asserter Instance is displayed.
    Description of litmus_tracking.png follows
    Description of the illustration litmus_tracking.png

  2. Select Oracle Asserter Result from the hamburger menu menu to view results. You can expand expand icon to display the expected payload results and the actual payload results. 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 Tracking 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. From the hamburger menumenu for the integration, select Export.
  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 (if any) 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.

    The Import Integration dialog is refreshed to show the Include Asserter Recordings (if any) check box.

  7. Select the Include Asserter Recordings (if any) check box, then click Import.

Delete a Recorded Instance

You can delete a recorded instance.

  1. Go to the Integrations page or the Tracking page.

    1. On the Integration page, find the integration that includes the recording.
    2. On the Tracking page, find the integration instance that includes the recording.
  2. From the hamburger menu menu, select Oracle Asserter > Recordings.

  3. Select the recording.

  4. Select the row of the recording to delete, and click the Delete icon.
    Description of litmus_replay.png follows
    Description of the illustration litmus_replay.png

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 to submit to Oracle.

  2. From the hamburger menu menu, select Oracle Asserter > Submit Recordings.

  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.