Testing scripts
Introduction
The build & test page includes an integrated test panel, to the right of your code. Here, you can build up realistic test inputs — a sample payload, plus any variables your script uses — then run the script and inspect the output, logs and errors.
Test inputs
Select the test inputs tab to set up your test data.
Payload
Add/paste a payload that can be used to test your script — for example:

Standard inputs
Every script — whatever its type — receives the standard inputs, as key/value pairs. Use the add variable option in each section to build up your test values:

Variables
Key/value pairs for any variables your script references.
Flow variables
Key/value pairs for any flow variables your script reads or updates.
Metadata
Key/value pairs for any payload metadata your script works with.
Running a test
Make sure your latest changes are saved, then click the run button — the button confirms which version will be run (for example, run v3, where v3 is the version you're currently viewing).
The script runs against your test inputs, and the results are displayed in the logs tab.
Reviewing results
When a run completes, the time taken is displayed (for example, ran in 95 ms), and results are organised into three tabs:
Logs
Any log messages written by your script during the run — useful for tracing how the script behaved.
Output
The result returned by your script — typically your transformed payload.
Errors
Any errors raised during the run — if the script failed, look here first.
For example, the output tab after converting an XML payload to JSON:

From here you can pretty print the result for easier reading, copy it to your clipboard, or download it as a file.
Keep refining and re-running until you're satisfied that the script is working as required.
Next steps
Once testing is complete, you can:
Deploy the script version so it can be used (and update any flows already using this script).
Last updated
Was this helpful?