Variables allow you to insert dynamic values into your test steps. This is useful when tests need unique data for each run—like generating a unique email address or username.
Available Variables
Variable
Description
Example Output
{{unique}}
Generates a unique number
1736875200000
More variables are coming soon. Check back for updates on additional dynamic values you can use in your tests.
How to Use Variables
Add variables directly in any input field during test creation:
When filling out test details, include the variable in any text input
Example: Enter testuser_{{unique}}@example.com as an email address
Adding Variables in Edit Mode
You can also add variables to existing tests:
Open your test and click Edit Mode
Edit any step to include a variable in the input field
Save your changes
Example Use Cases
Unique email addresses:signup_{{unique}}@test.com
Unique usernames:user_{{unique}}
Unique form data:Order #{{unique}}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Decipher AI Docs","colors":{"primary":"#181d27","light":"#a8a8c7","dark":"#181d27"},"logo":{"light":"https://mintcdn.com/decipherai/dLwBqZJ3d9fGHmsO/logo/icon.png?fit=max\u0026auto=format\u0026n=dLwBqZJ3d9fGHmsO\u0026q=85\u0026s=a0154d758fb21dd1f7b340bb04fd7273","dark":"https://mintcdn.com/decipherai/dLwBqZJ3d9fGHmsO/logo/icon.png?fit=max\u0026auto=format\u0026n=dLwBqZJ3d9fGHmsO\u0026q=85\u0026s=a0154d758fb21dd1f7b340bb04fd7273"},"favicon":"https://mintcdn.com/decipherai/dLwBqZJ3d9fGHmsO/logo/icon.png?fit=max\u0026auto=format\u0026n=dLwBqZJ3d9fGHmsO\u0026q=85\u0026s=a0154d758fb21dd1f7b340bb04fd7273","navbar":{"links":[{"href":"mailto:team@getdecipher.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.getdecipher.com"}},"footer":{"socials":{"x":"https://x.com/decipher_ai","github":"https://github.com/decipherai","linkedin":"https://www.linkedin.com/company/decipher-ai"}},"integrations":{"posthog":{"apiKey":"phc_h7LvsgsTESodwr6a8VYnNJzWp4cuVRpqMBV15Mrlp4f","apiHost":"https://o3017525720594717.ingest.getdecipher.com/posthog/7563983771934952"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"decipherai","hasAudioNarration":false,"actualSubdomain":"decipherai","customDomains":["docs.getdecipher.com"],"gitSource":{"type":"github","owner":"decipherai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae91e3aab2971a8eb0bf286:success","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Testing","count":34},{"language":"default","tag":"Monitoring","count":25},{"language":"default","tag":"API Reference","count":13},{"language":"default","tag":"Managing Tests","count":9},{"language":"default","tag":"Advanced","count":5},{"language":"default","tag":"Local Browser","count":4},{"language":"default","tag":"Behavior","count":3},{"language":"default","tag":"Test Results \u0026 Alerts","count":3},{"language":"default","tag":"Testing Integrations","count":3},{"language":"default","tag":"General","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"pages/features/testing/variables","slug":"/pages/features/testing/variables","pageMetadata":{"title":"Variables","description":"Use dynamic values in your test steps","icon":"brackets-curly","href":"/pages/features/testing/variables"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use dynamic values in your test steps\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Table,Tip}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Variables allow you to insert dynamic values into your test steps. This is useful when tests need unique data for each run—like generating a unique email address or username.`}),`\n`,_jsx(Heading,{level:`2`,id:`available-variables`,children:`Available Variables`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Example Output`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`{{unique}}`})}),_jsx(_components.td,{children:`Generates a unique number`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1736875200000`})})]})})]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`More variables are coming soon. Check back for updates on additional dynamic values you can use in your tests.`})}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-use-variables`,children:`How to Use Variables`}),`\n`,_jsx(_components.p,{children:`Add variables directly in any input field during test creation:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`When filling out test details, include the variable in any text input`}),`\n`,_jsxs(_components.li,{children:[`Example: Enter `,_jsx(_components.code,{children:`testuser_{{unique}}@example.com`}),` as an email address`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-variables-in-edit-mode`,children:`Adding Variables in Edit Mode`}),`\n`,_jsx(_components.p,{children:`You can also add variables to existing tests:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Open your test and click `,_jsx(_components.strong,{children:`Edit Mode`})]}),`\n`,_jsx(_components.li,{children:`Edit any step to include a variable in the input field`}),`\n`,_jsx(_components.li,{children:`Save your changes`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-use-cases`,children:`Example Use Cases`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unique email addresses:`}),` `,_jsx(_components.code,{children:`signup_{{unique}}@test.com`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unique usernames:`}),` `,_jsx(_components.code,{children:`user_{{unique}}`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unique form data:`}),` `,_jsx(_components.code,{children:`Order #{{unique}}`})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Variables","description":"Use dynamic values in your test steps","icon":"brackets-curly","href":"/pages/features/testing/variables"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Available Variables","slug":"available-variables","depth":2,"children":[]},{"title":"How to Use Variables","slug":"how-to-use-variables","depth":2,"children":[]},{"title":"Adding Variables in Edit Mode","slug":"adding-variables-in-edit-mode","depth":2,"children":[]},{"title":"Example Use Cases","slug":"example-use-cases","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"decipherai","siteName":"Decipher AI Docs","title":"Variables - Decipher AI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"pages/features/testing/variables.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use dynamic values in your test steps\">\u003cmeta data-mint-head name=\"application-name\" content=\"Decipher AI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Variables - Decipher AI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use dynamic values in your test steps\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Decipher AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getdecipher.com/pages/features/testing/variables\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://decipherai.mintlify.site/_mintlify/api/og/v2?division=Managing+Tests\u0026amp;title=Variables\u0026amp;description=Use+dynamic+values+in+your+test+steps\u0026amp;theme=a5a49b97ba7509b24e8e65bd\u0026amp;signature=b60cf0bdaeccabf306966a22226b2eaba9d95ee26bc4756aef4b5b4655149de0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Variables - Decipher AI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use dynamic values in your test steps\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://decipherai.mintlify.site/_mintlify/api/og/v2?division=Managing+Tests\u0026amp;title=Variables\u0026amp;description=Use+dynamic+values+in+your+test+steps\u0026amp;theme=a5a49b97ba7509b24e8e65bd\u0026amp;signature=b60cf0bdaeccabf306966a22226b2eaba9d95ee26bc4756aef4b5b4655149de0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/decipherai/KAIMPSusSSmoeFOs/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Decipher AI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#181d27\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getdecipher.com/pages/features/testing/variables\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pages/features/testing/variables.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getdecipher.com/#organization\",\"name\":\"Decipher AI Docs\",\"url\":\"https://docs.getdecipher.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/decipherai/dLwBqZJ3d9fGHmsO/logo/icon.png?fit=max\u0026auto=format\u0026n=dLwBqZJ3d9fGHmsO\u0026q=85\u0026s=a0154d758fb21dd1f7b340bb04fd7273\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getdecipher.com#website\",\"name\":\"Decipher AI Docs\",\"url\":\"https://docs.getdecipher.com\",\"publisher\":{\"@id\":\"https://docs.getdecipher.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getdecipher.com/pages/features/testing/variables#webpage\",\"url\":\"https://docs.getdecipher.com/pages/features/testing/variables\",\"name\":\"Variables\",\"description\":\"Use dynamic values in your test steps\",\"isPartOf\":{\"@id\":\"https://docs.getdecipher.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getdecipher.com/pages/features/testing/variables#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getdecipher.com/pages/features/testing/variables#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Managing Tests\",\"item\":\"https://docs.getdecipher.com/pages/features/testing/suites\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Variables\",\"item\":\"https://docs.getdecipher.com/pages/features/testing/variables\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.getdecipher.com/pages/features/testing/variables#article\",\"headline\":\"Variables\",\"name\":\"Variables\",\"description\":\"Use dynamic values in your test steps\",\"url\":\"https://docs.getdecipher.com/pages/features/testing/variables\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getdecipher.com/pages/features/testing/variables#webpage\"},\"publisher\":{\"@id\":\"https://docs.getdecipher.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getdecipher.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Decipher AI Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Decipher AI Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/pages/features/testing/variables.md","siteName":"Decipher AI Docs","nav":{"global":null,"tabs":[{"tab":"Testing","groups":[{"group":"Introduction","pages":[{"title":"Welcome to Decipher","icon":"house","mode":"wide","href":"/pages/introduction/intro"}]},{"group":"Testing","pages":[{"title":"Recording a Test","icon":"flask-vial","iconType":"solid","href":"/pages/features/testing"},{"title":"Agentic Test Generation","icon":"wand-magic-sparkles","iconType":"solid","href":"/pages/features/testing/generate-with-claude"},{"title":"Step Types","icon":"layer-group","iconType":"solid","href":"/pages/features/testing/step-types"},{"title":"Login Identities","icon":"user-lock","iconType":"solid","href":"/pages/features/login-identities"}]},{"group":"Managing Tests","pages":[{"title":"Test Suites \u0026 Tags","icon":"folder-tree","href":"/pages/features/testing/suites"},{"title":"Updating Tests","description":"Modify existing tests using Edit Mode","icon":"pen-to-square","href":"/pages/features/testing/updating-tests"},{"title":"Variables","icon":"brackets-curly","href":"/pages/features/testing/variables"},{"title":"File Uploads","description":"Upload files in test steps to test file inputs on your pages","icon":"file-arrow-up","iconType":"solid","href":"/pages/features/testing/file-uploads"},{"title":"Environments","icon":"globe","href":"/pages/features/testing/environments"},{"title":"Custom Host Headers","icon":"lock-open","href":"/pages/features/testing/preview-auth-headers"},{"title":"Owners","icon":"user-shield","href":"/pages/features/testing/owners"},{"title":"Code Execution","icon":"code","iconType":"solid","href":"/pages/features/testing/code-execution"},{"title":"Local Tunnel","icon":"terminal","iconType":"solid","href":"/pages/features/testing/local-tunnel"}]},{"group":"Local Browser","pages":[{"title":"Run in Local Browser","icon":"laptop-code","iconType":"solid","href":"/pages/features/testing/run-locally"},{"title":"TypeScript Wrapper","icon":"code","iconType":"solid","href":"/pages/features/testing/run-locally-wrapper"},{"title":"Python Wrapper","icon":"python","iconType":"solid","href":"/pages/features/testing/run-locally-python"},{"title":"Download Playwright Spec","icon":"download","iconType":"solid","href":"/pages/features/testing/download-playwright-spec"}]},{"group":"Test Results \u0026 Alerts","pages":[{"title":"Test Failures","icon":"circle-exclamation","href":"/pages/features/testing/test-failures"},{"title":"Test Alerts","icon":"bell","href":"/pages/features/testing/alerts"},{"title":"Agent Context","icon":"brain","href":"/pages/features/testing/agent-context"}]},{"group":"Testing Integrations","pages":[{"title":"GitHub integration","icon":"github","iconType":"solid","href":"/pages/features/testing/github-pr-integration"},{"title":"Claude Code Integration","icon":"robot","href":"/pages/features/testing/claude-code-integration"},{"title":"Linear integration","icon":"ticket","iconType":"solid","href":"/pages/features/testing/linear-integration"}]},{"group":"General","pages":[{"title":"Teams","icon":"users","href":"/pages/features/teams"}]}]},{"tab":"Monitoring","pages":[{"title":"Monitoring","href":"/pages/browser-quickstart"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Variables - Decipher AI Docs","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":[],"chunks":[]}