Testing an Action using Action Editor
Concept and Need:
While making modifications in an Action definition, it is often useful to validate the changes before releasing the Project so that user can make necessary modifications based on execution response.
This can be achieved using the Test Tab.
Test tab provides capability to capture necessary configuration and test data.
There are two sections in the Test tab.
The Connectivity section can be used to provide connectivity configuration that is needed to execute an Action.
Note: These settings are persisted across Actions.
An Action can be tested either by selecting a Destination or by providing Manual configuration.
- Using Destination
Action can be executed using destinations created in the subscriber’s subaccount.
Destination can be selected using the Select Destination dropdown in the connectivity panel.
Note: There can be many Destinations created in the cockpit and not all Destinations are relevant for an Action Project. Due to this very reason, user needs to explicitly allow destinations to be used by Actions framework.
These Destinations will be displayed in the editor for selection and can be consumed by the Actions framework.
- Using Manual Configuration
Alternatively, the user can also use manual configuration to test an Action.
This helps in testing an Action quickly by eliminating the need of destination creation.
‘No Authentication’ and ‘Basic Authentication’ is currently supported in Manual configuration.
Providing Test Input
Test inputs can be provided in the form present below Connectivity section.
Properties that user has added in the input parameter table and input body table are displayed along with the default values.
After entering test data an Action can be executed using ‘Test’ button .
Note: Input provided by the user is validated against the input schema definition before the Action is executed.
Viewing Action execution response
After action execution is successful. The output will be displayed in Response Preview.
User might see a difference between the actual API response and Action response because the API response is filtered on the basis of output schema definition. If a property is present in API response but it is not part of output schema, it will be filtered out.
Response preview is accessible from Input/Output/ Test tabs to make modifications easier.
Note: Maximum response size of 1MB is supported for an Action. An error dialog will be displayed if response size exceeds permissible limits.
Thanks for reading and I hope it helped to understand how an Action can be tested using Actions Editor. Please feel free to leave a comment if there are any questions and I would be happy to receive any feedback.
- Part 1 of the Blog Series: The New Actions Project – Major Changes including the Actions Editor Available Now !! | SAP Blogs
- Part 2 of the Blog Series/Parent Blog: Actions Editor – Feature List, Usage and Maintenance of Actions Project