Post-deployment tests: CI/CD scenarios and deep checks
A successful deployment confirms that code publication completed. It does not yet prove that the application serves users correctly. A smoke test can open a product and check the cart, while a deep check verifies a background task. Both are DockRay scenarios, covering different application layers.
Trigger a scenario from CI/CD
The scenario settings contain external trigger information. Authenticate with its project's private key as a Bearer token. Store the key in protected pipeline secrets, never in source code or public logs. External triggering requires the corresponding account-plan feature.
POST /api/v1/flows/{flow}/run
Authorization: Bearer <PROJECT_PRIVATE_KEY>
Replace {flow} with the scenario identifier from the panel. A 202 response with queued confirms acceptance, not a passing test. Read the returned poll_url and requested_at.
Avoid reading an older result
Poll the returned address with since set to the returned requested_at, correctly URL-encoded. This avoids mistaking a previous run for the new deployment's result. Waiting states including queued, running and pending require further polling. Only passed confirms a pass; failed indicates failure and inconclusive provides no verdict. Do not judge the test solely by the HTTP status or success field.
The wait parameter waits for a result for up to two minutes. The delay parameter postpones the run by a number of minutes, normally 1–60, for example while caches warm up. Delayed requests return immediately; do not combine delay with waiting on the same connection. Handle rate limits and exhausted budgets instead of retrying indefinitely.
What should a deep endpoint return?
Implement a public HTTPS endpoint protected by a token that returns JSON. DockRay calls it; your application executes the check. Example response:
{"status":"pass","message":"Import completed","steps":[{"label":"Import","status":"pass","duration_ms":12}]}
Use pass for a satisfied condition, fail for an unmet condition and skip when no verdict is possible. Choose a measurable criterion, such as the age of the last successful import. Keep secrets and customer data out of result messages. This endpoint's token and the DockRay project private key serve different purposes.
Can MCP trigger scenarios?
Yes. flows.list, flows.get and flows.run provide scenario reading and triggering. They require MCP access and appropriate key abilities; read access alone does not authorize execution. Plan and run limits still apply.
Choose a test type with the synthetic monitoring guide, then investigate failures with the troubleshooting guide.