Articles in this section

Run a flow in test mode

Test mode lets you run a flow against mock or live data before it's enabled in production, so you can confirm each step behaves as expected. This article covers switching a flow to test mode, choosing a source, running and canceling a test, and how sources behave differently across test, enabled, and scheduled runs. For reviewing what a test run produced, see Review test run results. For the mock-data mechanics referenced throughout, see Provide mock data for testing flows and The integrator.io canonical format for mock data.

Before you test

  • Licensing — Any license lets you run a flow in test mode as many times as you like, against as many endpoints as you like.
  • Permissions — You can test-run any flow in an integration you have access to.
  • NetSuite — Update to bundle version 1.28.0.0 and SuiteApp version 1.11.0 or later to guarantee no records are created, deleted, or updated in NetSuite during a test run.
  • Files — No files are deleted from a server during a test run, even if Leave file on the server isn't set.
  • Pages — A test run processes only the first page of data.
  • SuiteScript hooks — Be careful with test runs that make a live call to NetSuite from a SuiteScript hook, or from any hook using a virtual export or import — a live call can unintentionally create or update a record even during a test.
  • Trace keys — The record ID field is the trace key by default, unless you've defined a trace key template. If the number of mock output records doesn't match the number of exported records, and the top-level record ID is mapped in response mapping, the trace key may not resolve as expected. See Set a custom trace key to uniquely identify a record.

Test mode applies only within Flow Builder — it doesn't affect anything outside the flow you're testing. The Dashboard doesn't show test-run information, the integration's flow list is unaffected, and disabled flows stay disabled regardless of test activity.

If you use hooks, a testMode boolean flag is available as an input parameter so your scripts can behave differently during test runs, previews, or send calls. It's supported in preSavePage, preSend, preMap, postMap, postSubmit, postAggregate, and postResponseMap hooks for exports and imports. An export preview doesn't reflect the results of a testMode flag in a hook, but any downstream destination step does.

Script editor with testMode set to true

Script editor with testMode set to false

Switch to test mode

A flow automatically runs in test mode whenever it's disabled — the Run button becomes Run test. Enabling the flow returns the button to Run. To put an enabled flow into test mode, disable it first.

Flow Builder in test mode

Flow Builder in production mode

Set the source for the test run

If a flow has more than one source, select which one provides the data for the test from the Run test drop-down; the first source is selected by default. How the selected source behaves depends on how the flow ultimately runs:

Run test source drop-down

Run type Source behavior
Test flow run The source you select is stored for your session and reused for subsequent test runs.
Enabled flow run The selected source is never stored — to run production for a single source, you have to select it manually each time.
Scheduled flow run If the flow isn't triggered by manually selecting a source — it runs on a schedule, a webhook listener triggers it, or it's set to run after another flow completes — the entire flow runs, including all sources.
Listener export Can't be triggered manually in production. In test mode, you can use mock output data as a stand-in source to run a test.

For an offline source, provide mock output data yourself or use Populate with > Live data to pull a live sample; provide mock response data for every destination the same way. See Provide mock data for testing flows.

Run a test flow

  1. Select Run test at the top right of Flow Builder. The Select a source to run test window opens.

    Select a source to run test window

  2. Select a source from the drop-down, then select Start.

If a test run takes longer than 100 seconds, integrator.io shows a message letting you cancel or keep waiting. To prevent runaway test runs, integrator.io automatically cancels a test after five minutes if the endpoint doesn't respond within two minutes, or if the script throws an uncaught exception.

Test run progress window

Cancel a test run

While a test is running, select the Cancel job icon in the Actions column of the Run console tab, or select Cancel test run. The Test mode enabled switch stays disabled until the run finishes or is canceled.

Cancel job icon in the Run console