Skip to Content
Product Information
Author's profile photo Jasmeet Singh

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.
 

Parent Blog: 

 Actions Editor – Feature List, Usage and Maintenance of Actions Project 

This can be achieved using the Test Tab.
Test tab provides capability to capture necessary configuration and test data.

Test Tab


Figure%201%3A%20Test%20Tab 

Figure 1: Test Tab

There are two sections in the Test tab. 

  • Connectivity 

The Connectivity section can be used to provide connectivity configuration that is needed to execute an Action. 

Figure%202%3A%20Connectivity%20panel

Figure 2: Connectivity panel

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. 

To do so Go to destination and add additional property
sap.applicationdevelopment.actions.enabled = true

Figure%203%3A%20Adding%20additional%20properties%20to%20a%20destination

Figure 3: Adding additional properties to a destination

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.

Figure%203%3A%20Manual%20Configuration%20panel

Figure 4: Manual Configuration panel

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.   

Figure%204%3A%20Input%20form%20to%20enter%20test%20data

Figure 5: Input form to enter test data

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.

Figure%205%3A%20Response%20Preview 

Figure 6: Response Preview
 

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.

 

References

 

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Yasasri Akkireddy
      Yasasri Akkireddy

      Hi Jasmeet singh,

       

      I am using a GET call with schema definition. I am getting api response but action response is coming as empty object. Could you please help me out! Thanks in Advance!