{
    "componentChunkName": "component---src-templates-page-jsx",
    "path": "/docs/test-management/qi-home/arcus-cli/write-and-run-tests-locally/",
    "result": {"data":{"markdownRemark":{"html":"<p><strong>Ask Claude Code to write Testsigma test cases for the repository you are working in, validate them with the Arcus CLI, and run them on a browser or connected device.</strong></p>\n<p>Complete <a href=\"https://testsigma.com/docs/test-management/qi-home/arcus-cli/set-up-the-arcus-cli/\">Set up the Arcus CLI</a> and <a href=\"https://testsigma.com/docs/test-management/qi-home/context-mapping/connect-claude-code/\">Connect Claude Code</a> first. For Android mobile test cases, connect your device in Testsigma Terminal before you start.</p>\n<hr>\n<h2 id=\"write-test-cases-for-your-repository\" style=\"position:relative;\"><a href=\"#write-test-cases-for-your-repository\" aria-label=\"write test cases for your repository permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Write test cases for your repository</strong></h2>\n<ol>\n<li>Open Claude Code from your project directory.</li>\n<li>Run <strong>/arcus:test</strong>, or ask Claude Code for Testsigma test cases in plain language. Claude Code writes code-based test cases and includes the element locators it detects in your source.</li>\n<li>Review the test cases Claude Code writes.</li>\n<li>Read the validation output. The CLI validates each test case offline and reports errors without running the test case.</li>\n</ol>\n<hr>\n<h2 id=\"run-test-cases-locally\" style=\"position:relative;\"><a href=\"#run-test-cases-locally\" aria-label=\"run test cases locally permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Run test cases locally</strong></h2>\n<ol>\n<li>Confirm your browser or device is available.</li>\n<li>Accept the run when Claude Code offers to run the validated test cases.</li>\n<li>Read the pass and fail results in the output.</li>\n</ol>\n<div class=\"custom-block alert alert-info\"><div class=\"custom-block-heading\"><strong>NOTE</strong>:</div><div class=\"custom-block-body\"><p>Test cases stay on your machine until you push them. Running a test case locally does not create it in Arcus.</p></div></div>\n<hr>\n<h2 id=\"convert-existing-playwright-or-selenium-scripts\" style=\"position:relative;\"><a href=\"#convert-existing-playwright-or-selenium-scripts\" aria-label=\"convert existing playwright or selenium scripts permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Convert existing Playwright or Selenium scripts</strong></h2>\n<p>If you already have a Playwright or Selenium suite, ask Claude Code to convert those scripts into Testsigma test cases instead of writing them again. The CLI validates the output and reports what did not translate.</p>\n<ol>\n<li>Open Claude Code from the directory that holds your existing scripts.</li>\n<li>Ask Claude Code to convert the scripts to Testsigma test cases.</li>\n<li>Read the validation output for translation errors.</li>\n</ol>\n<h3><strong>Check each converted test case for:</strong></h3>\n<ul>\n<li><strong>Custom helpers and page objects</strong>: These may need restructuring.</li>\n<li><strong>Waits, retries, and assertions</strong>: Playwright and Selenium forms differ from Testsigma's.</li>\n<li><strong>Hard-coded test data and environment values</strong>: Move these into test data profiles and environments.</li>\n<li><strong>Steps that act outside the application under test</strong>: Review these individually.</li>\n</ul>\n<hr>","frontmatter":{"title":"Write and run tests locally","page_title":"Write and run tests locally","metadesc":"Write Testsigma test cases with Claude Code, validate them with the Arcus CLI, and run them locally on a browser or connected device.","noindex":false,"contextual_links":[{"type":"section","name":"Contents","url":null},{"type":"link","name":"Write test cases for your repository","url":"#write-test-cases-for-your-repository"},{"type":"link","name":"Run test cases locally","url":"#run-test-cases-locally"},{"type":"link","name":"Convert existing Playwright or Selenium scripts","url":"#convert-existing-playwright-or-selenium-scripts"}]},"fields":{"slug":"/docs/test-management/qi-home/arcus-cli/write-and-run-tests-locally/"}}},"pageContext":{"slug":"/docs/test-management/qi-home/arcus-cli/write-and-run-tests-locally/","prev":{"fields":{"slug":"/docs/test-management/qi-home/arcus-cli/set-up-the-arcus-cli/"},"frontmatter":{"title":"Set up the Arcus CLI","metadesc":"Install and authenticate the Arcus CLI, set up the Claude Code plugin, and connect a device with Testsigma Terminal for local test execution.","canonical":null,"keywords":null,"social_share_summary":null,"social_share_desc":null,"social_share_image":null,"noindex":false}},"next":{"fields":{"slug":"/docs/test-management/qi-home/faqs/"},"frontmatter":{"title":"FAQs","metadesc":"Frequently asked questions about QI Home — Ad-Hoc vs Sprints, coverage, quality metrics, Agentic Learning, Copilot, and developer context mapping.","canonical":null,"keywords":null,"social_share_summary":null,"social_share_desc":null,"social_share_image":null,"noindex":false}}}},
    "staticQueryHashes": ["2855385900","63159454"]}