(v1) Testing of simple process-direct iFlow
Prerequisites
In order to complete this scenario, You will need the following components and access rights
A working installation of SAP Cloud Integration
Access to the SAP Cloud Integration as developer, allowing for managing the Integration Packages and their content, including upload, modification and deployment
A working installation of Int4 Suite Cloud Edition
Existing connection (Environment definition) between Int4 Suite Cloud Edition and SAP Cloud Integration
In case the connectivity is not yet established, You’d need a few more things
Instances of API and Runtime services on the SAP Cloud Integration and relevant Service Keys
Access to the Int4 Suite Cloud Edition with full access (administrative rights)
Technical checklist
Make sure to have these information handy before starting:
What | Purpose | Example / Data |
---|---|---|
URL to Cloud Integration | Access Cloud Integration and upload iFlows for testing | An URL similar to: https://xxxxx.xx/itspaces/shell/monitoring/Overview |
URL to application launchpad hosting Int4 Suite Cloud Edition | Access the product and configure test scenarios | An URL similar to: https://xxxxxx.xx/ui#Shell-home |
Login data / credentials to Cloud Integration | Access the software | Based on local system policies |
Logon data / credentials to Int4 Suite Cloud Edition | Access the software | Based on local system policies |
iFlow for testing | The integration content for Cloud Integration to be tested | For this scenario we prepared a simple integration content for download: |
Test input payload | Payload to be sent to the interface | For this scenario we prepared an Input Message payload for download: |
Test output payload | Payload expected at the output of interface for validation | For this scenario we prepared an Output Message payload for download: |
Have Fun!
This guide is designed in a way to hold Your hand, as You start working with the product. For all our Beginner scenarios we want them to be as easy as possible, allowing anyone to get their first automated tests up and running quickly and without friction. The Int4 team sincerely hopes You’ll enjoy learning about the product and use it to accelerate Yours and Your Team’s operations.
In case You find Yourself in trouble, please note the https://int4support.atlassian.net/wiki/spaces/INT4CLOUD/pages/edit-v2/2444853302#Troubleshooting-notes at the end of this material, where You can find helpful information addressing common problems.
Setup of systems under test
Upload the integration content
Navigate to Your Cloud Integration system. Follow the logon process using Your credentials, and You should see a screen similar to this:
Choose design from the menu
*In case the Desing option is not available, please reach out to Your IT service desk with request of developer permissions for the respective system
Click “Import” in the top-right corner of the browser window
File open dialog will pop-up. Please download the and choose the file in the dialog box.
The import should progress automatically. In a few seconds You should see a confirmation at the bottom of the browser screen:
And a new Item should appear on the Package list
Click on the newly created package to open the details page
Then click on
Artifacts (1)
to list the package contentsIn order to use the imported service, it needs to be deployed. Click on the
Actions
icon and chooseDeploy
It might be necessary to select and confirm the runtime profile for deployment. Default
"Cloud Integration"
should be OK for simple installations.Click
"Yes"
in the popup.The deployment should commence within a minute. In the meantime, proceed with next steps.
Ensure connectivity
Now we need to ensure that the testing tool can connect with system under test. The actual connectivity setup is described in the (v1) Getting started section, on the (v1) SAP Cloud Integration page.
In this manual we assume the connectivity is up and running, and we just need to validate it works before progressing further.
Start by logging into Your installation Int4 Suite Cloud Edition and choosing the Environments tile.
If at this stage You don’t have access to the SAP BTP platform or You can’t see the relevant tiles and/or applications, then please contact Your organization security team to resolve the access issue.
Environments list will appear. If the list is empty, please follow the (v1) SAP Cloud Integration page for installation instructions, or ask Your SAP Basis teams for support - depending on Your authorizations.
Locate the environment that was either just created or links to the SAP Cloud Integration platform You wish to work with. After clicking on a specific line, You will see the environment details and can check if it’s exact URL matches the Cloud Integration platform where You uploaded the iFlow in the previous step.
Please note the URL’s and the Check Connection
buttons. If the URL matches Your Cloud Integration instance, please click both of the Check Connection
buttons to validate connectivity setup is proper.
Assuming the connection is successful, please proceed with next steps of the guide.
Common pitfalls at this step relate to potential network issues (e.g. if the test tool and Cloud Integration are in different networks or BTP accounts) and authorization issues. Your SAP Basis teams could assist in making sure the tenants and services can connect to each other. The SAP Basis team can usually also help in making sure the service keys created in SAP Cloud Integration have the correct set of authorizations, as documented in the (v1) SAP Cloud Integration page.
Test tool configuration
The next steps focus around creating the test cases. In this exercise we assume that You’re starting from scratch.
Start with logging into the product and open the API Tester Cockpit
using the relevant tile.
The cockpit screen appears, allowing further manipulation.
We believe that our application screens are simple and self explanatory. However, if You don’t feel comfortable with the next steps just yet, please review the (v1) Get familiar with product and navigation help pages to understand the basics of the API Tester Cockpit
Create folders
First, let’s create a folder for our test cases. Using the Create
menu on the left, choose to create a new Main folder.
Enter the folder description in the pop-up and select the environment accordingly to the previous steps.
Now press to create the folder. You should see it now on the left side of the screen.
Configure test scenario
Another step important for test execution is it’s configuration. For this, the product defines Test Configuration objects which represent the settings needed to create and execute test cases. While they are documented thoroughly in the (v1) Product reference, for this scenario on the (v1) SAP CI E2E Inbound page, we will give You here the basic guide how to create and setup this scenario.
First we need to navigate to the relevant tile to start the application.
You will notice a list. Please click on top, to start creation of a new configuration for Your test scenario.
Please fill in the necessary details, giving Your configuration a name, and choose the SAP CI E2E Inbound
as the type. Then click
Now a quite complex page appears. We will start with the very basic definition, that is choosing the integration flow that we wish to test. Click on Import from IS
button.
A pop-up will appear, with search functionality aimed to help with locating the needed iFlow subject for testing. Choose the environment defined earlier from the dropdown and click
A list of iFlow’s will appear. It’s exact content is subject to Your organization’s progress in SAP Cloud Integration usage, so the list might be crowded. Put beginner
in the Name
input field, and click again. You should now easily locate the iFlow imported earlier.
Click on the iFlow name to confirm the selection. The iflow ID will be copied to the configuration screen and a new option will appear just beside the name - Show graph
. Click on it, again choose the environment, and You will be able to preview the iFlow definition without leaving the API Tester Cockpit.
A bit on the iFlow testing
For successful test execution, we have to instruct the product where to look for iFlow processed data. For some, this might be on the End
step. For more complex cases, You might wish to use any of the blocks, excluding Start
block, which is a limitation imposed by SAP Cloud Integration monitoring.
Choosing the block to collect payload to compare
Click on the End
circle. A few icons will appear just beside it, click on the one with outgoing arrow to set the end block as the output capture source.
Click OK
and notice, that the EndEvent_2
was added as the output payload block.
Now, we need to inform the system how to send data to the iFlow in question. This will always depend on how the iFlow is constructed and what input it accepts. In our case, the demo iFlow is simple, using ProcessDirect
as an entry point. Please setup the further configuration sections accordingly
Field | Value | Meaning |
---|---|---|
Adapter type | PROCESSDIRECT | We would use ProcessDirect adapter to inject the data into the iFlow under test. |
ProcessDirect endpoint | /beginnerA1input | This is how the example iFlow imported before is configured. |
The effects should look like below:
This concludes our test configuration setup. Click to store the configuration.
Test case creation
To create a new test case, first we need to navigate back to the API Tester Cockpit
. Then switch to the Edit
mode in the Cockpit.
First, select Your new test folder created before from the tree on the left.
Please click on the button present on the top right of the screen. You will notice the Folders list will change the header a bit.
Click on the button to create a new test case. You will notice a new empty line on the list.
We need just a few basic information to complete this beginner scenario
Field | Value | Meaning |
---|---|---|
Description | Put any free-form text here to name Your test scenario | This is a description of the test case visible through the solution in test case management and in execution |
Type | SAP CI E2E Inbound | Test type assigns a specific technical testing program to interface with the platform under test |
Automation Object (could be shown as Test Configuration) | MY_FIRST_CONF | Here You assign the test configuration to the test case. This specifies which interface (iFlow) is tested and what are the success conditions |
Now, click on the top right to confirm. Once the saving completes, You will notice the test case created. Click on the right arrow towards the end of the screen to edit the details, as we need to populate the test case payloads
A screen with Test Case details appear. First, switch to Edit mode using the familiar button on the top right. In the payloads section You will notice one Payload entry, and the
Add Output
button. Click it to create a new entry on the Payloads list.
Clicking on the respective lines opens the payload editor. Please click on the Payload
line and the editor will open.
Now, in the empty area please paste the contents of the beginner_A1_input_payload.txt
file that You can download from the top of this page. Then click in bottom right to close the editor.
Follow the same for the Output
line, this time pasting in the beginner_A1_output_payload.txt
file contents. Again click in bottom right to close the editor.
If all went well, on the right hand side You should see that the payloads sizes changed.
Now press in the top right of the screen to save Your updates.
Test case execution
Here we get finally to the test execution. Navigate to the API Tester Cockpit
, choose Your folder and press on the button to start the test cases.
A pop-up will spring up, asking for confirmation - this is a safety measure in case there would be multiple test cases present, to double check with the user if running all of the test cases is the actual intent.
Click Yes
and the test execution will schedule to start immediately. A new browser tab will open allowing You to monitor the test execution progress.
After a few seconds, the test should complete, providing summary information.
Now, before closing this section, please click on the icon on the list, to open up the details of the test execution. Here You can see the details about the execution, like test metadata, the message ID assigned in the SAP Cloud Integration, and details on payload comparison which shows how the received message compares to the output payload provided in the test case.
Great! You’ve just finished the beginner tutorial for testing SAP Cloud Integration simple ProcessDirect
based iFlow!
Troubleshooting notes
Connectivity issues
This beginner tutorial assumes that the installation prework documented in the (v1) Getting started section of the manual was duly completed. There are various reasons, why it could fail. The most common ones would be:
connectivity on the network level or SAP BTP platform leven - You need to confirm with Your SAP Basis and Network teams that the server or tennant running the product is configured to be able to connect to the SAP Cloud Integration platform under test
authorization issues - configuration of SAP Cloud Integration connectivity is straightforward thanks to the ability to copy service key JSON data directly into the Environment configuration screen, so in case authorization issues occur, the authorizations assigned to the service key should be validated against the documentation page: (v1) SAP Cloud Integration
mismatch in configuration - setting up Cloud Integration requires two service keys to be configured in the right places, maybe they have been swapped?
general access issues - this beginner guide is assuming that You’re operating on a development or sandbox environment, where people should generally have access to import iFlows and test them without limits, however Your access to Int4 Suite Cloud Edition or to the SAP Cloud Integration could be limited or missing, which would result in not being able to progress; in such case contact Your SAP Security team asking for wide developer and tester permissions in these platforms
Failed test execution
Even if all the above is correct, this scenario could lead You to a failed test case execution. Don’t worry - this is a testing tool and it’s sole purpose is to detect and help resolve integration errors before they reach production. So failure - in a way - should be expected and welcomed as information about the development readiness and quality.
In case You’d encounter a failure like shown above, please click on the icon on the test case list to see the error details.
In case You’ll see any RED error messages in the Execution information
, please double check all the connectivity (as listed above), as that could mean that the connectivity setup is not correct. It could also mean that You simply skipped over the first steps and did not import and deploy the demo iFlow linked in the scenario.
If the Execution Information
section seems OK (with GREEN and BLUE messages), scroll down further and check the Payload Comparison Results
section. It might look a bit like this:
This means that in line 4 of the payload there is a mismatch. While the text data seems the same, the little red box at the end of line 4 suggest some superfluous or missing data.
The above error suggest a missing line or character in the comparison payload - as You can see the red block at the end of the Act
line which represents the message received from the integration platform in the current test run.
Let’s try to fix this.
Navigate back to the Test case, switch into Edit mode and click on the Output
line to open the editor for the payload. Make sure there is no character after the last semicolon and that the payload ends with a new empty line. It should look like this:
Now click Ok
, then the test case and try running it again. Now the results should be all correct!
Summary
Thanks for getting over this beginner scenario for testing a simple ProcessDirect
based iFlow in SAP Cloud Integration using the Int4 Suite Cloud Edition. I hope You like how simple it is to execute test cases and compare results. You were able to validate the installation and initial configuration, create folder for test scenario and the configuration for it. You then created Your test case and executed it. You also could have understood how important it is to keep the testing payload quality high to enable useful test results.
We hope You like this experience and invite You to learn more! Consider taking the next course: (v1) Testing of simple JMS iFlow .
Thank You!