Articles in this section

Test a tool in Tool builder

A test run executes the tool end to end with its mock input, so you can confirm the logic, mapping, and output before any flow, API, or agent depends on it. This article shows integrator.io users how to prepare a tool for testing, run the test, read the Run console and step results, open the errors for a step, capture step-level debug logs, and understand when test data is discarded. Test runs aren't recorded in the tool's Logs tab; for real invocations, see View tool invocation logs.

Before you begin

  • The tool input and tool output are both configured. Run test is disabled until they are. See Configure tool input and Configure tool output.
  • The tool has at least one lookup or import. See Add lookups and imports to a tool.
  • Each lookup has mock input, and each import has mock response data. A step without mock data runs with placeholder data. To use real records instead, open the step, select Mock output, and then select Populate with > Live data — this calls the application and can create or update real records. Mock response data you enter yourself must include a statusCode.

Run a test

  1. Go to AI studio, and then select Tools.
  2. Select the tool.
  3. Select Run test.

The Run console opens at the bottom of the canvas with a Test run badge and one row for the run.

Column Description
Started / Completed When the run started and finished.
Status Completed, or the current state while it runs.
Duration Elapsed time.
Success / Ignored / Errors Record counts for the run.
Pages Pages of records processed.
Actions Download diagnostics for the run.

Expand the run to see one row per step with the same columns.

While a run is in progress, Run test becomes Cancel test run. A message appears after 100 seconds; a run is canceled automatically after two minutes or when a script throws an uncaught exception.

Read the results on the canvas

After the run, every step, router, and chip that ran shows a blue T, and each step shows Success or N errors. Select Success or N errors on a step to open its results.

Selecting N errors opens Test run errors, titled with the step's name, with Total errors, and one row per error with Timestamp, Message, Source (the step), Code, and Classification. Select a row to see Error details. Test run errors are read-only; you can't edit or retry them. A tool_output_schema_validation_failed error means the mapped result didn't satisfy the output schema — see Troubleshoot tools.

Scripts and branching conditions receive testMode: true in the record during a test run, so they can tell a test from a real invocation.

Capture step-level debug logs

Debug logs record a step's requests and responses in detail for a limited time.

  1. Open the step, and then select View debug logs.
  2. Select Start debug, choose Next 15 minutes (the default), Next 30 minutes, Next 45 minutes, or Next 60 minutes under Capture debug logs, and then select Apply.
  3. Run the test, and then select Refresh logs. Debug logs shows real invocations and Test run debug logs shows test runs.
  4. Select Stop debug when you're done. Logging also stops when the duration ends.

Debug logging captures only activity after it starts; it doesn't include runs that happened before. For the log viewer, see Debug flow steps.

When test data is discarded

Test results and the data in the Run console are discarded when you run another test, modify a step, navigate away from the tool, refresh the page, or your session expires. Mock input and mock response data are saved with the tool and aren't affected.

Related articles