ReleaseOwl Docs
  • ReleaseOwl Admin Guide
    • General Administration
      • User & Role Management
      • Project Management
      • Landscape Registration
      • Global Credential Management
      • Settings
      • Landscape Connectors
      • Parallel Landscape Configuration
      • Static Code Analysis
      • RO Agents
    • ALM Integrations
      • Jira
        • Jira Cloud
        • Jira On-Premise
        • Jira Automation Rules
      • Azure DevOps
      • ServiceNow
      • Freshservice Integration
    • Other Integrations
      • ReleaseOwl Callout Feature
      • DocuSign
    • Landscape Mapping
  • ReleaseOwl User Guide
    • Change Management
      • Backlog
      • Sprints
      • User Stories
      • Release Versions
      • User Story Dependency
    • Transport Management
      • On-Prem Environment Registration
      • Creation of Transports
      • Transport Validation and Analysis Reports
      • Transport Promotion and Pipeline Activity
      • Transport Management Actions
      • Transport of Copies
      • Retrofit & Conflict Resolution
      • gCTS
        • Build pipeline support for onPrem Fiori
    • SAP BTP
      • Administration
        • Credential Management
        • Cloud Environment Registration
      • Working with Build Pipelines
        • Static Code Analysis
        • Change Log Analysis
        • Download Artifact
        • Labels
      • GIT Ops
    • SAP API
      • Adminstration
        • Credential Management
        • Cloud Environment Registration
      • API Management
    • SAP CPI
      • SAP CPI Integration with ReleaseOwl
      • CPI Test Generator
      • CPI Management
        • Synchronize CPI Artifacts
        • Artifact Versions
        • CPI Artifact Comparison
        • Backup & Rollback
        • CPI Validation - CPILint
        • iFlow Unit Testing
        • Integration Advisor
    • SAP Analytics Cloud
    • SAP Datasphere
    • Working with Release Packages
      • Create Release Package with User Stories
      • Create Release Package with Transports
      • Release Package Validation with Transports
    • Working with Release Pipelines
      • Pipeline Tasks
        • Approval Task
        • Callout Task
        • Manual Task
        • User Story Status Task
        • Test Execution Task
        • Message Listener Task
        • GCTS Merge Task
        • GCTS Activate Task
        • GCTS Switch Task
        • Import via Toc Task
        • Transport Retrofit Task
        • Release Transport Task
        • DocuSign Approval
        • Validation Task
      • Use Cases
        • Automated Transport import along with Transport Promotion
        • Automated MTAR Deployments
        • Automated CPI Deployments
    • Test Automation
      • HCL OneTest
        • Test Configurations
        • Running Automated Tests with Release Pipelines
      • Tosca Integration
      • Integrating UiPath with ReleaseOwl
    • My Tasks
    • Multiverse
    • Utilities
      • ABAP Version Compare
      • gCTS Merge
Powered by GitBook
On this page
  • Prerequisites
  • Generating Test Cases
  • Generate Test Cases
  • Executing Test Cases
  • Comparing Test Run Messages
  • Running Test Cases for Process Direct and JMS Adapters
  • Mocking Test Cases
  1. ReleaseOwl User Guide
  2. SAP CPI

CPI Test Generator

PreviousSAP CPI Integration with ReleaseOwlNextCPI Management

Last updated 1 month ago

The CPI Test Generator helps automate the process of testing SAP Cloud Platform Integration (CPI) Integration Flows (iFlows). It allows you to generate, execute, and review test results, making the integration testing process efficient and error-free. This guide will walk you through the steps for deploying, configuring, testing, and mocking your iFlows using the ReleaseOwl platform.

Prerequisites

1. SAP Process Integration Runtime Service Instance

  • Navigate to Instances and Subscriptions and click Create.

  • Fill in the following details:

    • Service: SAP Process Integration Runtime

    • Plan: integration-flow

    • Runtime Environment: Cloud Foundry

    • Space: Dev

    • Instance Name: Choose a suitable name

  • Click Next, then Create to set up the instance.

  1. Create Service Key

  2. Enable Custom Idp

  3. Enable Test Automation in ReleaseOwl CPI Environment Configuration

  4. Update the OAuth credentials and Instance URLs in the ReleaseOwl CPI Environment using the details from the Service Key in SAP BTP Cockpit.

Generating Test Cases

Enable Trace in Artifact Runtime Log Configuration

  • In SAP BTP Cockpit, go to Integration and APIs and select the iFlow you want to test.

  • Navigate to Artifact Details and change the Log Level to Trace to track detailed logs during testing.

  • Trigger the iFlow with the expected input using Postman or another tool.

Generate Test Cases

  1. In CPI Test Generator, click Generate Test Cases.

  1. Select the Artifact Name for the iFlow.

  2. After the iFlow execution, go to the ReleaseOwl Dashboard and click Fetch Activity Messages.

  1. When you click on the Test Case button, ensure that special characters are not used in the CPI test case names.

  1. This will retrieve messages from the latest iFlow execution. The first message will be the input message, and the remaining messages will be treated as output messages.

  1. Click the Eye Icon to view the messages.

  2. Select the Message Group ID and click Generate Test Case.

  1. Enter the Test Case Name and Description, then click OK.

Executing Test Cases

  1. Click Run to execute the test case.

  1. After execution, click the Actions button (···) and select Last Test Results to view test case results.

  2. You can view the executed test cases, including details such as:

    • Run ID

    • Artifact Name

    • Environment

Run on button: It provides an option to select a particular environment before executing the test case.

Test Runs: Displays all test runs with timestamps, executed artifact versions, and environments.

Comparing Test Run Messages

  • Expected Output: The message recorded during test case creation.

  • Actual Output: The message from the current test execution.

  • Differences: Differences between the header and exchange properties of the expected and actual messages.

  • Added Label: Indicates unmatched paths where the expected output is null, improving message comparison visibility in the test results.

  • The Ignore List allows you to exclude specific paths, header properties, and exchange properties (e.g., timestamps, generated IDs, etc.).

Editing and Updating Test Cases

  • If a test case needs adjustments (e.g., missing parameters in the iFlow), click Edit to modify it.

  • If steps are added or removed in the actual iFlow, the messages in the testcase should also be updated. Click on Update Messages will execute the iFlow using the input from the testcase, which will display the latest messages from the trace.

  • The user can review these messages and update the testcase with the new message steps. Click on the Save button to save the updated messages to the testcase.

Active Button

  • If you need to temporarily disable the execution of a test case, uncheck the Active button.

  • Once the issue is resolved, re-enable the test case by checking the Active button again.

Mock Endpoints

  • When enabled, ReleaseOwl mocks all receiver channels in the iFlow with HTTPS receivers pointing to the ReleaseOwl mock service.

  • ReleaseOwl creates a new iFlow with the name ROMOCK and prefixes the package name with ROMOCK.

  • The mock service simulates responses returned by external calls using recorded messages from the test case generation.

  • This allows integration flow testing without relying on actual external APIs.

Supported Sender Adapters

Test cases can be executed against iFlows using the following sender adapters:

  • HTTP Adapter

  • SOAP Adapter

  • IDoc Adapter

  • Process Direct Adapter

  • JMS Adapter

Running Test Cases for Process Direct and JMS Adapters

  1. Process Direct Adapter and JMS Adapter do not have HTTP endpoints, so test cases cannot be executed directly.

  2. To test them, import the CPI Connector Package provided by ReleaseOwl into your CPI tenant.

  1. After importing the package, deploy the iFlow artifacts so they can have endpoints.

Mocking Test Cases

ReleaseOwl mocks all the receiver channels in the iFlow with https receivers pointing to ReleaseOwl mock service.

Mocking Steps:

  1. Edit the test case and enable Mock Endpoints to simulate receiver endpoints using the HTTP receiver provided by ReleaseOwl.

  1. Run the test case with mock enabled.

  2. Mock Package and iFlow:

    • A Mock Package and Mock iFlow will be created in the CPI tenant with the prefix ROMOCK.

Test Results after Execution:

  • Executed on Artifact ID: Displays the artifact name against which the test case was executed.

  • Executed Artifact Version: Shows the version of the artifact used for the test case execution.

86KBReleaseOwl Integrations.ziparchive