{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "name": "Testing Shield in CI and local dev | Edge Docs",
  "headline": "Testing Shield in CI and local dev | Edge Docs",
  "description": "Fixed test sitekeys and secrets that behave deterministically. Run your test suite against Shield with no real keys, network state or analytics noise.",
  "url": "https://edge.network/docs/shield/testing",
  "image": "https://edge.network/og/docs__shield__testing.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Docs",
        "item": "https://edge.network/docs"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Shield",
        "item": "https://edge.network/docs/shield"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "Testing",
        "item": "https://edge.network/docs/shield/testing"
      }
    ]
  },
  "section": "documentation/shield",
  "articleBody": "Docs CDN Deployments, domains, caching, purging and on-the-fly image optimisation. Getting started \n Deployments \n Domains & SSL \n Compute Virtual machines in seconds: networking, firewalls, backups and SSH keys. Getting started \n Creating VMs \n Managing VMs \n DNS Zones, records, geo-routing, backups and development domains. Getting started \n Zone management \n DNS records \n Storage S3-compatible buckets, access keys, presigned URLs and multipart uploads. Getting started \n Buckets \n Access keys \n Shield Privacy-first bot protection: widget modes, siteverify and verified agents. Getting started \n Widget modes \n JavaScript API \n Assist AI answers from your own content: widget, ingestion and the API. Getting started \n Widget & embedding \n Content ingestion \n Pulse Uptime monitoring from several locations: checks, incidents, alerts and status pages. Getting started \n Check types \n Locations & intervals \n REST API Manage every Edge resource over HTTPS with API keys. Authentication \n Errors \n Versioning \n Compute \n CDN \n DNS \n CLI One binary for macOS, Linux and Windows to script every product. Installation \n Authentication \n Compute commands \n CDN commands \n DNS commands \n Storage commands \n Dev tooling Command palette and keyboard shortcuts across the console. Command palette \n Agent tooling Let AI agents deploy and manage infrastructure: discovery, MCP and access codes. Start with the overview MCP server \n MCP tool reference \n Connect your tool \n Framework wrappers \n Self-signup \n Access codes \n Discovery endpoint \n Deploy a static site \n Deploy an app \n Projects \n Bot protection \n AI answers \n Uptime monitoring \n Account & support Teams, security, audit logs, alerts, billing tools and support. Start with the overview Teams \n Referral programme \n Cost Advisor \n Security \n Two-factor auth \n Audit log \n Alerts \n Support tickets \n Search the docs ⌘K Console Products\n\n CDN Compute DNS Storage Shield Overview Getting started Widget modes JavaScript API Server-side validation Offline verification Testing & CI Static sites Verified agents Turnstile migration Analytics Examiner Assist Pulse Developer tools\n\n REST API CLI Dev tooling Agents\n\n Agent tooling Account\n\n Account & support Test sitekeys (client side) Copy Anchor Link \n\n Use these in place of your real sitekey to force a specific widget behaviour:\n\n Sitekey Behaviour es_test_pass Always verifies. The widget shows the normal success state and produces a token es_test_block Every solve fails. Use it to exercise your error handling and no-token paths es_test_interactive Background attempts always escalate to the \"I am human\" confirmation first HTML Copy Text <!-- In your test/staging environment --> \n < div class =\" edge-shield \" data-sitekey =\" es_test_pass \"></ div > Test secrets (server side) Copy Anchor Link \n\n Use these in place of your real secret to force a specific siteverify response, regardless of the token you send:\n\n Secret siteverify response es_secret_test_pass success: true , score 90 es_secret_test_fail success: false with invalid-input-response es_secret_test_spent success: false with timeout-or-duplicate (the replayed-token path) Terminal Copy Text # Always succeeds, score 90 \n curl -X POST https://shield.edge.network/siteverify \\ \n -d \" secret=es_secret_test_pass \" \\ \n -d \" response=anything \" Response:\n\n JSON Copy Text { \n \" success \": true , \n \" score \": 90 , \n \" challenge_ts \": \" … \", \n \" hostname \": \" localhost \", \n \" error-codes \": [] \n } What test traffic can and can&#x27;t do Copy Anchor Link \n\n Test keys work on any hostname, including localhost , with no widget configuration.\n Test challenges use trivial proof-of-work, so CI runs stay fast.\n Test traffic records no analytics and no scoring signals, so it cannot skew your real widgets&#x27; metrics or the network&#x27;s scoring.\n Tokens minted by test sitekeys are dummy strings that only test secrets accept. A real secret will never validate one, and vice versa.\n Caution\n\n Never ship test keys to production. es_secret_test_pass accepts anything, so a form \"protected\" by it is protected by nothing. Keep test keys in test configuration only, exactly as you would a mock.\n\n Next steps\n\n Getting started\n\n Protect your first form in five minutes\n\n Server-side validation\n\n The siteverify API and humanity score\n\n Something unclear or out of date? Tell us , or read this page as Markdown .\n\n Offline verification\n\n Previous\n\n Static sites\n\n Next",
  "headings": [
    {
      "level": 1,
      "text": "Testing &amp; CI"
    },
    {
      "level": 2,
      "text": "Next steps"
    },
    {
      "level": 3,
      "text": "Getting started"
    },
    {
      "level": 3,
      "text": "Server-side validation"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/cdn/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Deployments",
      "url": "https://edge.network/docs/cdn/deployments"
    },
    {
      "@type": "WebPage",
      "name": "Domains &amp; SSL",
      "url": "https://edge.network/docs/cdn/domains"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/compute/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Creating VMs",
      "url": "https://edge.network/docs/compute/creating-vms"
    },
    {
      "@type": "WebPage",
      "name": "Managing VMs",
      "url": "https://edge.network/docs/compute/managing-vms"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/dns/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Zone management",
      "url": "https://edge.network/docs/dns/zones"
    },
    {
      "@type": "WebPage",
      "name": "DNS records",
      "url": "https://edge.network/docs/dns/records"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/storage/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Buckets",
      "url": "https://edge.network/docs/storage/buckets"
    },
    {
      "@type": "WebPage",
      "name": "Access keys",
      "url": "https://edge.network/docs/storage/access-keys"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/shield/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget modes",
      "url": "https://edge.network/docs/shield/widget-modes"
    },
    {
      "@type": "WebPage",
      "name": "JavaScript API",
      "url": "https://edge.network/docs/shield/js-api"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/assist/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget &amp; embedding",
      "url": "https://edge.network/docs/assist/widget"
    },
    {
      "@type": "WebPage",
      "name": "Content ingestion",
      "url": "https://edge.network/docs/assist/ingestion"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/pulse/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Check types",
      "url": "https://edge.network/docs/pulse/check-types"
    },
    {
      "@type": "WebPage",
      "name": "Locations &amp; intervals",
      "url": "https://edge.network/docs/pulse/locations"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/api/authentication"
    },
    {
      "@type": "WebPage",
      "name": "Errors",
      "url": "https://edge.network/docs/api/errors"
    },
    {
      "@type": "WebPage",
      "name": "Versioning",
      "url": "https://edge.network/docs/api/versioning"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/docs/api/compute"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/docs/api/cdn"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/docs/shield/testing",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-26T16:11:23.563Z"
}