Test a Cloud Function
Test a Cloud Function
Run the draft of a Cloud Function, or its published code, without real effects: reads are sent, writes are recorded as would-send with a synthetic answer, and lead changes are only previewed.
POST
Test a Cloud Function
Run the draft of a Cloud Function on a test copy that cannot change anything. Without a draft, the test runs the published code.
What happens during a test
Send an event-shaped
ctx to test with. Without it, the function receives {}.
A test has the same time and request limits as a real execution. It appears in run history with sample_label test_run, but it does not change run_count, last_run_at, or last_run_status.
Read the result
run.statusissuccess,error, ortimeout. An error in your code is a successful call withrun.statuserror.run.effectslists the previewed lead changes.run.requestslists every request made throughfetchoraxios. The ones withblocked: truewere not sent.run.modeistest.
DEPLOYMENT_NOT_CURRENT means the test copy could not be prepared. Nothing ran and nothing was recorded. Retry in a moment.
To verify a real write, publish the code while the function is paused, then turn it on and watch its next runs.Authorizations
API key for authentication. Keys are prefixed with nxr_live_.
Path Parameters
Cloud Function id.
Body
application/json
Optional event-shaped ctx to test with. Defaults to {}.
Last modified on October 6, 2026