Use Cloudflare Turnstile dummy sitekeys to exclude the widget from your own E2E test suite

domain: developers.cloudflare.com/turnstile · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. In your test environment configuration, set the Turnstile sitekey to the always-pass test value: 1x00000000000000000000AA
  2. Set the corresponding secret key in your backend token validation to the always-pass test secret: 1x0000000000000000000AA
  3. Render the Turnstile widget with the test sitekey in your staging or test deployment — it will auto-complete without presenting a challenge to Playwright or Selenium
  4. In your backend, call the siteverify endpoint with the dummy secret; it will return success: true for any token produced by the test sitekey
  5. Add an environment variable guard (e.g. TURNSTILE_SITEKEY) so production deployments always use real keys from your Cloudflare dashboard
  6. Optionally use sitekey 2x00000000000000000000AB (always-fail) in tests that verify your app's error handling when verification fails

Known gotchas

Related routes

Integrate Cloudflare Turnstile widget and validate tokens with the siteverify API
developers.cloudflare.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans