DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to assert phone flows inside a pytest suite with Artemis

Call ARTEMIS from Python and assert on the result in an existing test suite.

Short answer: Run git clone https://github.com/google/artemis.git && cd artemis and start the host with uv run artemis ui; then in your test project, run uv add "artemis-client @ git+https://github.com/google/artemis.git#subdirectory=packages/artemis-client". All steps.

Authorization notice. Artemis is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Who it is forA test engineer with an existing Python test suite who needs to cover a mobile flow in CI.

The problemMobile flows often sit outside the automated test suite because scripted UI tests are costly to write and maintain.

The outcomeA pytest test that sends a natural-language task to a device and fails the build if the task does not succeed.

What you need first

  • 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

Steps

  1. Run git clone https://github.com/google/artemis.git && cd artemis and start the host with uv run artemis ui.
  2. In your test project, run uv add "artemis-client @ git+https://github.com/google/artemis.git#subdirectory=packages/artemis-client"
  3. 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)
  4. Add assert result.succeeded to the test, using result.error or result.status in the failure message.
  5. Run your pytest suite and confirm the test passes on a known-good build and fails on a known-bad one.

Prompt for your agent

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.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for google/artemis and "Assert phone flows inside a pytest suite"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer