---
schema_version: "1"
id: 75187b4bf2ee245d80f52bc78ae4f4b32e95d4e895144c638ffbbfdf99794e54
title: Test a Flow for Error Handling
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/automate_flow_test_error_handling.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_error_handling.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: de7d51a34146362074c9f590990affbbaca5e50ccdf7fe030eef2f96a4dd93d4
description: Configure negative assertions to verify that a flow handles errors gracefully when you use automated testing.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Test a Flow for Error Handling

Configure negative assertions to verify that a flow handles errors gracefully when you use automated testing.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d229705e61">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d229705e61 ">To open, edit, create, activate or
              deactivate a flow using all flow types, elements, and features available in Flow
              Builder, including Einstein and Agentforce for Flow:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d229705e61 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

Configure negative assertions for Create Records, Update Records, Delete Records, and Action elements in any flow that uses automated testing, including autolaunched, record-triggered, and Data Cloud-triggered flows.

For more information about configuring assertions when you set up a test scenario in test mode, see [Set Up and Run a Test Scenario (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_scenario.htm&release=264.0.0&type=5 "Configure test data and run options, and then run the scenario in Test Mode (beta).").

1. Create a flow test scenario.
2. When you set assertions, select a resource for Create Records, Update Records, Delete Records, or Action elements.
3. For Operator, select **Has Error**.
4. Select a value, and save the flow test scenario.

![The flow test assertion that shows the selected Has Error operator](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/flow/automate_flow_test_has_error.png)

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example

Consider a flow that processes customer data. You can create a test scenario to make sure that the flow handles invalid input, such as a missing required field.