datadog-ci "synthetics test failed" in CI
datadog-ci synthetics run-tests triggers your Synthetic tests and waits for results; when at least one test fails an assertion or times out, the command exits non-zero so CI fails the gate. The failure is a real test result, not a tooling error.
What this error means
datadog-ci synthetics run-tests reports "Failed" tests in its summary and exits with a non-zero code, e.g. "1 test failed", failing the job.
[FAILED] Check homepage loads - https://app.datadoghq.com/synthetics/details/abc-def-ghi
* Assertion failed: statusCode should be 200, got 503
datadog-ci synthetics: 1 test failedCommon causes
The deployed target genuinely failed a check
A Synthetic assertion (status code, response time, body content) did not pass against the environment under test, so the test result is Failed.
The test config selects the wrong environment
A wrong --variable (such as START_URL) points the test at an environment that is down or not yet deployed, producing a real failure.
How to fix it
Read the failed assertion and fix the target
- Open the result link printed by datadog-ci to see the failed assertion.
- Confirm the environment under test is healthy and fully deployed before running tests.
- Re-run after the deploy completes.
Override variables to target the right env
Pass the correct base URL so the Synthetic test hits the environment you just deployed.
datadog-ci synthetics run-tests \
--config synthetics.config.json \
--variable START_URL="$DEPLOY_URL"How to prevent it
- Run Synthetic tests only after the deploy is fully live.
- Pass environment URLs as variables, not hard-coded values.
- Gate on the tests that matter so a real regression blocks release.