{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "google-artemis--add-artemis-to-pytest-suite",
 "repo": "google/artemis",
 "repo_url": "https://github.com/google/artemis",
 "repo_slug": "google-artemis",
 "title": "Assert phone flows inside a pytest suite",
 "page_title": "How to assert phone flows inside a pytest suite with Artemis",
 "summary": "Call ARTEMIS from Python and assert on the result in an existing test suite.",
 "who": "A test engineer with an existing Python test suite who needs to cover a mobile flow in CI.",
 "problem": "Mobile flows often sit outside the automated test suite because scripted UI tests are costly to write and maintain.",
 "outcome": "A pytest test that sends a natural-language task to a device and fails the build if the task does not succeed.",
 "steps": [
  "Run `git clone https://github.com/google/artemis.git && cd artemis` and start the host with `uv run artemis ui`.",
  "In your test project, run `uv add \"artemis-client @ git+https://github.com/google/artemis.git#subdirectory=packages/artemis-client\"`",
  "Create a pytest file that instantiates `ArtemisClient(\"http://artemis-host:8000\", device_serial=\"emulator-5554\", default_profile=\"flash\")` and awaits `client.run(...)` with your instruction. (inferred, check the README)",
  "Add `assert result.succeeded` to the test, using `result.error` or `result.status` in the failure message.",
  "Run your pytest suite and confirm the test passes on a known-good build and fails on a known-bad one."
 ],
 "agent_prompt": "In the google/artemis repo, write a pytest test that uses artemis_client.ArtemisClient to run the instruction: <instruction> on device <device_serial>. Expected output: a passing pytest result when the task succeeds and a failure message containing result.error or result.status when it does not. Verify the test calls client.run and asserts result.succeeded.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The SDK client only talks to a running ARTEMIS host, so the host and the device must be reachable from your CI runner before the test can pass.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "An Android device with USB Debugging enabled, or a running emulator",
  "git and a terminal (macOS, Linux, or Windows PowerShell)",
  "uv and Python, which the start script can install for you",
  "An AI IDE such as Antigravity, Codex, or Claude Code, if you want MCP control"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/google-artemis/add-artemis-to-pytest-suite/",
 "md": "https://dedupedai.com/use-cases/google-artemis/add-artemis-to-pytest-suite/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/google-artemis--add-artemis-to-pytest-suite.json",
 "api_version": "v1"
}
