Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
Screenshot demonstrating the sf flow run test command being executed in the Salesforce CLI environment.
DevOps

Run Flow Tests from CLI with Salesforce Summer '25 — sf flow run test

Summer '25 adds sf flow run test, so you can run Flow Tests from the Salesforce CLI and wire them into CI/CD instead of starting them by hand in Flow Builder.

The short answer

Salesforce Summer '25 adds the sf flow run test CLI command, which runs flow unit and regression tests programmatically. Teams can call it from CI/CD pipelines and local scripts instead of starting each test by hand in Flow Builder.

Key takeaways Run sf flow run test from your terminal in an authenticated org or Salesforce DX project to execute all available flow tests. Add sf flow run test to CI/CD tools like GitHub Actions, GitLab CI, or Jenkins so regression tests run during builds and deployments. Keep flow tests small and focused so a failure points at one specific flow behavior. Run flow tests on feature branches and pull requests, the same way you run any other test in source-driven development. Configure CI to abort the deployment when a test fails, and surface the logs where developers will read them.

Summer '25 lets you run Flow Tests from the Salesforce CLI with the new sf flow run test command, which puts them within reach of CI/CD and automated regression runs.

Run Flow Tests from the CLI

Summer '25 adds a CLI command for executing Salesforce Flow Tests: sf flow run test. Teams can run flow unit and regression tests from local scripts, CI pipelines, or release automation, rather than starting each one by hand in Flow Builder.

Why this matters

Automated flow tests catch errors earlier and take the manual effort out of a release. If you already run DevOps pipelines, adding Flow Tests to CI/CD means flows get checked before they reach production.

How to use

  • Open your terminal in a Salesforce DX project or authenticated org.
  • Run: sf flow run test. This executes all flow tests available in the org.
  • Wire the command into CI jobs (GitHub Actions, GitLab CI, Jenkins) so tests run during builds or before deployments.

Best practices

  • Keep flow tests small and focused so failures point to specific behavior.
  • Combine with source-driven development: run tests on feature branches and pull requests.
  • Fail fast in CI: abort the deployment on a test failure and surface clear logs for developers.

Typical uses are regression testing after a flow change, validating flows during a release pipeline, and nightly suites behind a quality gate.

Next steps

If you haven't already, add flow tests in Flow Builder, then wire the sf flow run test command into your pipeline. Since Summer '25, flow testing can live in the same pipeline stage as everything else you ship.

Admins, developers and release engineers all get the same thing out of it: less manual testing, and a deployment you can trust a bit further.

#SalesforceSummer25 #Flows #DevOps #CI #Salesforce

For more, please follow our page!

Frequently asked questions

How do you run Flow Tests from the Salesforce CLI?

Open a terminal in a Salesforce DX project or authenticated org and execute the command sf flow run test. This runs all flow tests currently available in the org.

How do you automate Salesforce Flow Tests in CI/CD?

Put the sf flow run test command in a CI pipeline job such as GitHub Actions, GitLab CI, or Jenkins. Flow tests then run during builds or before deployments, so regressions surface early.

What are the best practices for running Flow Tests in Salesforce?

Create small, focused flow tests in Flow Builder so a failure pinpoints a specific issue. Run those tests on feature branches and pull requests, and configure CI pipelines to abort deployments when tests fail.

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment