You build a flow. You click Debug, pick a record, and it works. A week later, someone asks for “one small change”. You add a new path, activate it, and go home happy. Next morning, the old path is broken, and nobody noticed until a user complained. Sound familiar? Flow Test Mode in Salesforce is built to stop exactly this.
It arrived as a beta in the Winter ’27 release, and it gives every admin a proper place to save tests, check expected results and see which paths of a flow are covered, without writing a single line of Apex.
In this blog, we will break down what Flow Test Mode is, how it works, and then build and test a real flow together, step by step.
What is Flow Test Mode?
Flow Test Mode is a separate testing space inside Flow Builder. Until now, building and debugging lived on the same canvas. With Test Mode turned on, the old Debug button gives way to a Build | Test switch at the top of Flow Builder, and Flow Builder now has two clear jobs:
- Build: Design and configure your flow, as you always have.
- Test: Run the flow, save what you ran as a reusable test scenario, and check the results.
Here’s a simple way to think about it.
Remember the practice exams at school? The teacher wrote the questions and the answer key once. Every time a student practised, checking the answers took a few seconds. Flow Test Mode works the same way. You write the “question” (which record, which inputs) and the “answer key” (what the flow should do) once. After that, every time your flow changes, you rerun the exam with one click.
Not another debug log. A repeatable test you can trust.
Why Flow Test Mode Matters for Admins
- Stop retesting by hand: Save a scenario once and run it again with a single click.
- Catch broken paths early: Assertions tell you pass or fail after every change.
- See what’s not tested: Flow Builder highlights the paths your automated tests cover, so the gaps are easy to spot.
- Test without calling real systems: Mock outputs let an Action or Subflow element return a value you define, instead of making a real callout.
The best part? Your saved scenarios can be shared with coworkers, so the whole team tests the same way.

Before You Start
- Editions: Lightning Experience in Professional, Enterprise, Performance, Unlimited and Developer editions.
- Status: Beta, covered by Salesforce’s Beta Services Terms. Try it in a sandbox or Developer Edition org first, not directly in production.
- Flow types: Record-triggered flows and autolaunched (no trigger) flows only. Screen flows and scheduled flows are planned for later.
- Permissions: You need access to Setup and Flow Builder (a System Administrator profile is easiest for practice).
- Where to practise for free: A free Salesforce Developer Edition org or a Trailhead Playground.
Key Terms, Simplified
- Test Mode: The testing side of Flow Builder, opened with the Build | Test switch. It replaces the old Debug button.
- Test Scenario: A saved test run: which record triggers the flow, which inputs it gets, and any mocked outputs.
- Assertion: An expected result, for example “the Set Hot Rating element was visited”. If it isn’t true, the test fails.
- Mock Output: A fake value you give an Action or Subflow element so it doesn’t run for real during a test.
- Test Coverage: How many paths of your flow are checked by automated tests.
Step-by-Step: Set Up Flow Test Mode and Build a Flow to Test
We will build one small, realistic example: a Lead Auto Rating flow. When a Lead is created or updated, the flow sets Rating to Hot if Annual Revenue is 1,000,000 or more, and Warm otherwise. Then we will test both paths.
We built and tested everything below in a brand-new Winter ’27 Developer Edition org. All the screenshots come from that org, so what you see is what you will get.
Step 1: Turn on Flow Test Mode
- Click the gear icon and open Setup.
- In Quick Find, type Process Automation Settings and open it.
- Scroll down and select Enable Flow Test Mode.
- Scroll to the bottom and click Save.

In our org, the checkbox label no longer says “(Beta)”, but Salesforce’s Winter ’27 release note still lists Test Mode as a beta, so treat it that way.
Result: Flow Builder now shows a Build | Test switch at the top of every record-triggered and autolaunched flow.
Step 2: Build the Lead Auto Rating flow
- In Setup → Quick Find, search for Flows and click New Flow.
- The New Automation window opens. Under Triggered Automations, click View All Automations, then choose Record-Triggered Flow.

- In Configure Start, set:
- Object: Lead
- Trigger the Flow When: A record is created or updated
- Optimize the Flow for: Fast Field Updates

- Click + below the start element and add a Decision element:
- Label: Check Revenue
- Outcome Label: High Revenue
- Resource: Triggering Lead → Annual Revenue
- Operator: Greater Than or Equal
- Value: 1000000
- Click Default Outcome and rename it Other Revenue.

- On the High Revenue path, click + and add an Assignment element:
- Label: Set Hot Rating
- Variable: Triggering Lead → Rating · Operator: Equals · Value: Hot (pick it from Picklist Values)

- On the Other Revenue path, add another Assignment element:
- Label: Set Warm Rating
- Variable: Triggering Lead → Rating · Operator: Equals · Value: Warm
- Click Save, enter the Flow Label “Lead Auto Rating”, click Save again, and then click Activate.

Result: A simple flow with two paths, which is perfect for learning how tests and coverage work.
Step 3: Create two practice Leads
Flow Test Mode can use real records from your org as test data, so create two Leads from the Leads tab:
- Lead 1: Priya Sharma, Company: Chai Point Retail, Annual Revenue: 2,000,000
- Lead 2: Rahul Mehta, Company: Mehta Stationers, Annual Revenue: 200,000
Step 4: Create your first test scenario
- In Flow Builder, switch from Build to Test. The Test Scenario panel opens on the left.
- Expand Details and enter:
- Label: Hot Lead Path (the API Name fills in by itself)
- Description: Lead with revenue of 1M or more should be rated Hot
- Switch on Automated Test Scenario. This turns a one-time run into a reusable test with expected results.

Step 5: Pick the record and add assertions
- Expand Select Data Source and keep Run from Org Data. (The other option, Run from Data Silo, uses isolated test data instead of real records.)

- Under Set Triggering Record, keep Run the flow as if the record is: Created, then search for and select Priya Sharma. (If you switched on Automated Test Scenario after picking the record, pick it again. In our org, the toggle cleared it.)
- Expand Expected Results (Assertions) and add two assertions:
- Assertion 1: Resource Set Hot Rating · Operator Was Visited · Value True
- Assertion 2: click Add Assertion, then Resource Triggering Lead → Rating · Operator Equals · Value Hot
- Under Select Run Options, notice Run automation in rollback mode is ticked. Any record changes are rolled back after the test.

- Click Save Scenario. You will see “Scenario “Hot Lead Path” was created”. Run Scenario only becomes clickable after you save.
- Click Run Scenario.
Result: The header shows Passed. The Expected Results tab marks each assertion Passed, and Run Details shows that the “High_Revenue” outcome was executed.

Step 6: Add a second scenario for the Warm path
- Click the back arrow at the top-left of the Test Scenario panel. You land on Test Scenarios, with Manual and Automated tabs and a Testing Automation Coverage card. With one test, our coverage showed 50%.
- Click New Scenario and repeat Steps 4–5 with:
- Label: Warm Lead Path
- Triggering record: Rahul Mehta
- Assertion: Set Warm Rating · Was Visited · True
- Click Save Scenario, then Run Scenario. This time Run Details shows that the default outcome was executed.
Test It: Run All Your Flow Tests
- Go back to Test Scenarios and open the Automated tab.
- Click Run All.
- Check the cards. In our org, Total Automated Scenarios showed 2, both Passed, and Testing Automation Coverage jumped to 100% because both paths of the Decision are now tested.

- Now try breaking it on purpose. Switch back to Build, change the Decision value to
5000000, save it as a new version, and run all tests again. Priya’s revenue is only 2,000,000, so the Hot Lead Path test should now fail.
That failure is the whole point. Your test catches a mistake before a single user does.
Bonus: Mock outputs for callouts
If your flow calls an external system through an Action or a Subflow, you don’t want a test to hit the real system every time. In Test Mode, open your scenario, select that element, go to Scenario Output and turn on Use Mock Output. Then enter the value you want the element to return and click Run Scenario. The canvas marks the element as mocked. This is also a neat way to test your fault paths.
Common Mistakes and Limitations of Flow Test Mode
- Testing straight in production: It’s a beta. Practise in a sandbox or Developer Edition org first.
- Expecting screen flows to work: Only record-triggered and autolaunched flows are supported in the beta.
- Forgetting the target org: Any org you deploy your tests to must also have the beta turned on.
- Hard-coding record IDs: Tests that rely on a specific record can break in another org. Isolated test data (a data silo) avoids this, but it needs to be set up in an Apex class today.
- Assuming tests deploy with the flow: Flow tests are a separate metadata type (
FlowTest). You can deploy a flow without its tests, so package and deploy them together on purpose. - Expecting Apex-style rules: There is no 75% minimum coverage for flows like there is for Apex, so testing discipline is up to you.
- AI test generation is a paid extra: Generating scenarios with Agentforce from the terminal needs the Agentforce Platform Developer and Admin permission set licence.
A quick note on labels: Salesforce’s release note lists mock outputs for Action and Subflow elements as generally available, but you use them inside Test Mode, which is still beta. Treat the whole experience as beta for now.
What to Learn Next
- Trailhead: Automate Tests in Record-Triggered Flows to go deeper into test-driven flow building.
- Organise your automations: Our guide to the Automation Lightning App shows you where all your flows live and how to manage them.
- Deploy tests the right way: Since
FlowTestis its own metadata type, read our post on unlocked packages in Salesforce to see how to keep flows and their tests together. - Coming up: The Spring ’27 sandbox preview starts around 10 January 2027, so keep an eye on the release notes for the next Flow Test Mode updates.
Conclusion
Flow Test Mode gives admins what developers have had for years: tests you save once and run forever. You enable it in Process Automation Settings, save a scenario for each path, add assertions, and click Run All after every change. If a test fails, you know before your users do.
The question isn’t whether your flows will change. It’s whether you’ll know when a change breaks them.
Open a Developer Edition org today, build the Lead Auto Rating flow, and write your first two tests.
FAQ
Q1: Is Flow Test Mode generally available?
Salesforce’s Winter ’27 release note lists it as a beta. In our Developer Edition org, the setting is simply called Enable Flow Test Mode under Process Automation Settings.
Q2: Which flows can I test with Flow Test Mode?
Record-triggered flows and autolaunched (no trigger) flows. Screen flows and scheduled flows are planned for later.
Q3: Does running a test change my real records?
Not by default. Rollback mode is on by default in the scenario run options, so changes made during the test are rolled back.
Q4: Is the old Debug option gone?
With Test Mode on, Flow Builder shows a Build | Test switch instead of a Debug button. Debugging now happens inside Test, next to your saved scenarios, and Run Details shows every step the flow took.
Resources
- Salesforce Admins blog: Flow Test Mode (Beta): The Future of Flow Testing
- Salesforce Admins blog: Jen’s Top Winter ’27 Release Features for Admins
- Salesforce Help: Test Flows in a Dedicated Test Mode (Beta)
- Salesforce Help: Test Flows in Isolation with Mock Outputs
- Trailhead: Automate Tests in Record-Triggered Flows
Found this useful? Check out more blogs on Salesforce Shastras and subscribe to @sfshastras on YouTube for weekly explainer videos.




Leave a Reply