App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Exploring the new Test facility for API flows in App Connect Designer

By Matthew Clarke posted Thu October 15, 2020 08:51 AM

  

In the latest IBM Cloud Pack for Integration release (CP4i 2020.3.1), you can test a running App Connect Designer API flow with the new API flow test feature. With an already deployed Cloud Pack for Integration and an App Connect Designer instance available, we can look further at this feature by using a simple scenario.

The previous “Try this flow” blog showed how you can invoke an authored flow in the App Connect Designer flow editor and observe its behavior.

Once we have confidence that an authored API flow is ready for use, the next logical task would be to start that flow and make it available for further testing. Only this time, we will be invoking the running flow from the exposed endpoint from our App Connect Designer instance. 

When we open the running API flow from the Dashboard, we can see a Define tab and a Test tab. Selecting the Test tab opens the Overview page of the API flow. Here we can see the basic details about the API such as the URL of the API endpoint, and a facility to download the OpenAPI document that describes our API.

Overview page of Test tab

Tip: We can also export the OpenAPI definition of the API flow from the flow tile on the Dashboard by selecting that option from the list of export options. More information about exporting the OpenAPI definition can be found in this article.

In the left-hand panel of the Overview page, we can see the list of operations and model definitions that are currently implemented for the API flow, and can apply filters to help us navigate to a specific part of the API. Selecting an operation shows details about that operation, such as body, path, or query parameters that are applicable, complete with examples.

Operation details


Within an operation, we can go to the Try it tab, which offers a test tool to invoke the specific operation. This tab shows the request type, API endpoint, and the basic authentication credentials (username and password). These details can be copied from the tool if required, to invoke the operation externally from a consuming service or some other API testing tool.

To invoke the operation on our running API flow, we might need to provide some request body data that the API operation expects to be invoked with. We can provide that ourselves or can use the Generate button to generate sample data for us.
Then we can send the request by clicking the Send button and observe the resultant response that comes back. Details are provided about the Request and Response in respective sections that we can review.

Details for the request

Test success response details
Test success response details


We can adjust the sample data and try the request again to see if we get different responses. We can also then test the remaining operations to verify their implementations. If we need to adjust our API flow, we can stop the flow, make amendments, and then restart the flow to use the Try it feature again. There is no limit to how often we can test a running API flow.

Test error response details

We’ve demonstrated the ability to perform invocations on a running API flow from an App Connect Designer instance. More details about how to use this feature can be found in this article.


#AppConnect
#buildapi
0 comments
25 views

Permalink