IBM® App Connect now provides the capability to test your actions while you’re developing an App Connect flow.

In the latest release of App Connect, you can test a single action by using your authored mappings and sample data values, allowing you to rapidly gain confidence in the flows that you create.

Using the test action capability in App Connect

Until now in IBM App Connect, you’ve only been able to see your evaluated mappings based on your sample data (see Test your mappings and transformations with sample data while authoring IBM App Connect flows). But now, you can test the following actions in your flow:

  • All actions for all applications on the Applications tab; for example, Salesforce “Create lead”
  • Any API that you’ve listed on the APIs tab
  • The Log action on the Toolbox tab.

To test such an action, this is all that’s required:

  • For actions that require an account, ensure that a valid account is connected, such as your Salesforce account.
  • Make sure that the authored action is valid with no validation errors, such as missing required fields.

When the above conditions are met, the Test button is enabled. Clicking Test drives the action by using any authored mappings and sample data values that you’ve provided.

Eventbrite “New attendee” event to Salesforce “New lead” action with edited sample data

When the action is completed, a test result is returned, which you can see in the App Connect flow editor. Clicking View details shows the output from the test action result.

Salesforce “Create lead” test action result

Let’s explore this new feature with a simple use case.

Scenario: Building a ServiceNow incident tone analyzer that uses the test action feature

In my scenario, I have a ServiceNow instance. When a new ServiceNow incident is raised, I want to send a notification to certain recipients. I have some rules that I want to apply when it comes to notifying about a new incident, so that those incidents that require urgent attention get priority.

  • If the incident is deemed to have a negative tone above some threshold, send a Slack message to notify the SRE team of the incident.
  • Otherwise, send the operations team an email with details of the incident.

I can use the IBM Watson Tone Analyzer application to analyze the tone of the new ServiceNow incident, to determine whether the incident is a high priority. I can then use the test action feature to experiment with some sample data to have confidence in the mappings and determine the tone thresholds that I want.

I’ve added the IBM Watson Tone Analyzer “Get tone analysis” action to my flow, and have already authored the Text field to have references to the ServiceNow incident that will trigger the flow.

Using the edit sample data feature, I can now set some sample data values that represent the type of incidents that I want to analyze and determine a tone score for. Here’s an example of setting a value that’s likely to drive a negative score.

ServiceNow “New incident” event to Watson Tone Analyzer “Get tone analysis” action with edited sample data

When testing the action, I can see that the tone score has been returned. In this example, the test generated mostly sadness and anger – tones that I’d associate with negative comments.

Watson Tone Analyzer “Get tone analysis” test action result

I can then perform further tests of the action to understand what is a good threshold to trigger a notification message in Slack.

I can also use the test action feature to check that I send Slack messages that contain the right amount of information for the SRE team to investigate. I create the necessary mappings and update the sample data to represent the inputs for those mappings.

ServiceNow “New incident” event to Slack “Create message” action with edited sample data

I click Test to complete the “Create message” action, then check for the Slack message in my connected Slack account.

Slack “Create message” test action result

Conclusion

We’ve explored how the new test action feature provides a powerful development tool when you’re creating your App Connect flows. If you have any questions or feedback about this new feature, please leave a comment below.

Join The Discussion

Your email address will not be published. Required fields are marked *