Testing a non-running flow with sample data
While developing a flow in the flow editor, you can use sample data to test the mappings and transformations that you specify in the input fields for the configured nodes. You can also test (or try out) the effect of an action on its target application, or test (try out) the entire flow. This capability helps you verify the correct behavior of the flow before you deploy it for general use.
About this task
Testing the mappings and transformations of your data input within fields
You can use auto-generated or custom sample data to test the mappings and transformations that you specify in the input fields for the nodes in a flow.

Procedure
To use sample data to test the mappings and transformations in your input fields, complete the following steps:
Trying out an action on its target application
To test the effect of an action on its target application, invoke the action with sample data and then review the test results that the application returns.
About this task
You can test the following actions in your flow:
- All actions for applications that you have created accounts for on the Applications tab of the App Connect catalog; for example, Salesforce / Create lead
- Any API that you have connected to on the APIs tab of the App Connect catalog
- The Log utility on the Toolbox tab
To test an action, ensure that the following conditions are met:
- For actions that require an account, ensure that an appropriate account is connected; for example, your Salesforce developer account.
- Make sure that the configured action has no validation errors, such as missing required fields.
When these conditions are met, the Try this action icon is
enabled:

Procedure
To test your specified settings for an action, complete the following steps:
Trying out a flow
After configuring all the nodes in a flow, you can test the effect of the flow on its target applications by using sample data and reviewing the test results that are returned.
About this task
To test a flow, ensure that the following conditions are met:
- For actions that require an account, ensure that an appropriate account is connected; for example, your Salesforce developer account.
- Ensure that the configured nodes have no validation errors, such as missing required fields.
- Ensure that the flow can be started (but isn't currently running).Restriction:
- Flows that contain Batch process or Notification nodes cannot be tested.
- A For each node will process only the first three items that it receives.
When the conditions for testing are met, the Try this flow icon is
enabled:

Procedure
To test your configured settings for a flow, complete the following steps:
Example scenario
This example describes a scenario that causes App Connect to send a notification to members of a Slack channel when a new ServiceNow incident is raised. We want to apply some rules for notifications about new incidents, to give priority to incidents that require urgent attention.
- If the incident is deemed to have a negative tone above some threshold, send a Slack message to notify the Site Reliability Engineering (SRE) team about the incident.
- Otherwise, send the Operations team an email with details of the incident.
About this task
We can create a flow that uses IBM Watson® Tone Analyzer to analyze the tone of the new ServiceNow incident, to determine whether the incident is high priority. While developing the flow, we can use sample data to test individual actions and the entire flow to have confidence in the mappings and determine the tone thresholds that we want to use.