---
schema_version: "1"
id: bf374ca3abbf1ab65b9f5cfca857fb74691c3f1c2738d0b61c3eedf42e01a439
title: Testing Your Flow in Test Mode (Beta)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/automate_flow_test_mode.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 907621214facf4507da689d11df75f123956728d544d3e2053c8d4b4b7ca4669
description: Use Test Mode to configure, save, and run test scenarios for autolaunched and record-triggered flows. To use automated testing in Test Mode, turn on Scenario Testing Automation and add assertions to evaluate expected results automatically.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Testing Your Flow in Test Mode (Beta)

Use Test Mode to configure, save, and run test scenarios for autolaunched and record-triggered flows. To use automated testing in Test Mode, turn on Scenario Testing Automation and add assertions to evaluate expected results automatically.

### 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>

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

Note Test mode is a pilot or beta service that is subject to the Beta Services Terms at [Agreements - Salesforce.com](https://www.salesforce.com/company/legal/agreements/) or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the [Product Terms Directory](https://ptd.salesforce.com/). Use of this pilot or beta service is at the Customer's sole discretion.

## Turn On Test Mode

Before you can test a flow in Test Mode, an admin turns on the beta setting for your org. Learn how in [Turn On Flow Test Mode (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_enable.htm&release=264.0.0&type=5 "Turn on flow Test Mode for your org so that users can test autolaunched and record-triggered flows in Flow Builder.").

## Build and Test Modes

For autolaunched and record-triggered flows, use the Build and Test Modes to switch between building your flow and testing it. In Test Mode, the canvas switches to a test view, and limited editing of the flow is available. The test configuration panel opens so that you can provide the data and run options for a test scenario. To open or close the panel, click ![Open or close the testing panel](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/platform_automation/images/open_or_close_test_debug_panel.png) in the Flow Builder toolbar. To fully edit the flow, switch to build mode.

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

Note If you switch modes or switch to a different test scenario without saving, you lose any unsaved changes to the current test scenario.

## Configure a Test Scenario

Use the test configuration panel to select a flow path, provide a triggering record or input values, and select run options. Turn on Scenario Testing Automation when you want to use isolated test data, add assertions, or control rollback behavior. Learn more in [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).").

## Manage Test Scenarios

View, run, and manage all the test scenarios that you saved for a flow. Learn more in [Manage Test Scenarios (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_manage_scenarios.htm&release=264.0.0&type=5 "View, run, and manage all the test scenarios that you saved for a flow.").

## Review Test Results

After you run the test scenario, the Details tab shows the run's execution path and any errors, similar to the Flow Builder debugger. For an automatically evaluated scenario (Scenario Testing Automation on), an Expected Results tab also shows, with the status of each assertion. Learn how to interpret these results in [Interpret Test Scenario Results in Test Mode (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_interpret_results.htm&release=264.0.0&type=5 "In Test Mode, review the Details and Expected Results tabs after you run a test scenario, and troubleshoot failed assertions.").

## Mock Action and Subflow Outputs

You can also configure an action or subflow element to return predictable mock values instead of running its normal operation while testing. Learn more in [Test a Flow with Mock Outputs (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mock_output.htm&release=264.0.0&type=5 "Use mock outputs to test autolaunched and record-triggered flows without depending on external systems. Define predictable output values for action and subflow elements so your test scenarios validate flow logic instead of live callouts or subflow execution.").

## Use Isolated Test Data

Instead of testing against live org data, use dedicated, reusable test data from an Apex class that includes a test setup method. Learn more in [Test a Flow with Isolated Test Data](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_isolated_test_data_task.htm&release=264.0.0&type=5 "Test record-triggered and autolaunched flows using dedicated, reusable test data from an Apex class that includes a test setup method. After a test scenario runs, the isolated test data rolls back like an Apex unit test, so your org's live data stays as it was.").

## Generate Test Scenarios Automatically

To increase test coverage without manually configuring each scenario for record-triggered, autolaunched, or Data Cloud-triggered flows, see [Generate Test Scenarios with Agentforce for Flow](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_generate_using_ai.htm&release=264.0.0&type=5 "Skip the manual setup and use Agentforce to draft your test scenarios from the command line, without opening Flow Builder. Generate comprehensive test scenarios for a record-triggered, autolaunched, or Data Cloud-triggered flow, including success, fault, and edge-case paths.").

IN THIS SECTION:

- **[Turn On Flow Test Mode (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_enable.htm&release=264.0.0&type=5)**  
    Turn on flow Test Mode for your org so that users can test autolaunched and record-triggered flows in Flow Builder.
- **[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).
- **[Interpret Test Scenario Results in Test Mode (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_interpret_results.htm&release=264.0.0&type=5)**  
    In Test Mode, review the Details and Expected Results tabs after you run a test scenario, and troubleshoot failed assertions.
- **[Test a Flow with Mock Outputs (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mock_output.htm&release=264.0.0&type=5)**  
    Use mock outputs to test autolaunched and record-triggered flows without depending on external systems. Define predictable output values for action and subflow elements so your test scenarios validate flow logic instead of live callouts or subflow execution.
- **[Test a Flow with Isolated Test Data](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_isolated_test_data_task.htm&release=264.0.0&type=5)**  
    Test record-triggered and autolaunched flows using dedicated, reusable test data from an Apex class that includes a test setup method. After a test scenario runs, the isolated test data rolls back like an Apex unit test, so your org's live data stays as it was.
- **[Manage Test Scenarios (Beta)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_mode_manage_scenarios.htm&release=264.0.0&type=5)**  
    View, run, and manage all the test scenarios that you saved for a flow.

#### See Also

- [Test or Troubleshoot Flows with the Flow Builder Debugger](https://help.salesforce.com/s/articleView?id=platform.flow_test_debug.htm&release=264.0.0&type=5 "For flows that don't use Test Mode, use the Debug option to test or troubleshoot the flow. Review step-by-step details of how the flow runs and the path it takes.")
- [Customize What Happens When a Flow Fails](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_fault.htm&release=264.0.0&type=5 "Learn how fault paths customize what happens when a flow fails. Choose how to notify admins, guide users, and take a follow-up action.")