mobile-tester-agent
CLAUDE.md98 starsChanged 6 months agoMITView on GitHub
AI-powered mobile UI test automation for Android, iOS, and React Native. A Kotlin/Ktor backend exposes an HTTP API that hands natural-language scenarios to a Koog-powered LLM agent, which drives a real device or emulator. A React/Vite dashboard under web/ lets users author scenarios and trigger runs. Full documentation lives in docs/. Start there for anything non-trivial. All implement ExecutorInfo in agent/executor/<provider>/. Selected via POST /config (executorInfoId string, case-sensitive). These behaviors are load-bearing — see docs/ai-agent.md and docs/tools.md for the full…
- Reads credentials
- Installs packages
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 54
All implement ExecutorInfo in agent/executor/<provider>/.
- Very specific: line 70
Status-prefixed tool returns: Every @Tool returns a String starting with one of OK | TAPPED | VISIBLE | NOT_VISIBLE | NOT_FOUND | AMBIGUOUS …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
mobile-tester-agent
AI-powered mobile UI test automation for Android, iOS, and React Native. A Kotlin/Ktor backend exposes an HTTP API that hands natural-language scenarios to a Koog-powered LLM agent, which drives a real device or emulator. A React/Vite dashboard under web/ lets users author scenarios and trigger runs.
Where to find things
Full documentation lives in docs/. Start there for anything non-trivial.
| Doc | What it covers |
| docs/architecture.md | Runtime topology, request lifecycle, module map |
| docs/getting-started.md | Prerequisites, env, first run |
| docs/api.md | POST /run-test, POST /stop-test, POST /config payloads + errors |
| docs/ai-agent.md | MobileTestAgent, strategy graph, system prompt, executors |
| docs/tools.md | Tool catalog, status-prefix convention, utility layer |
| docs/frontend.md | React/Vite dashboard internals |
| docs/dependencies.md | Every third-party library, by reason |
Project layout
src/main/kotlin/
├── server/ # Ktor: Application, Routing, HTTP, Monitoring
│ └── model/ # AgentRequest, MobileTesterConfigAPI (wire DTOs)
└── agent/
├── MobileTestAgent.kt # Singleton — builds & runs the Koog AIAgent
├── strategy/ # TestingStrategy.kt — Koog graph
├── executor/ # Per-provider subfolders (anthropic, deepSeek, google, ollama, openRouter), each holding ExecutorInfo impls
├── model/ # MobileTesterConfig, TestScenarioReport
└── tool/
├── mobile/test/ # MobileTestTools, ReportingTools, utils/
└── reporting/ # ReportingTools scaffolding (not yet wired)
web/ # React 19 + Vite dashboard
docs/ # Source of truth for design + API docsBackend stack
- JDK 21 (Amazon Corretto), Kotlin 2.3.0, Gradle wrapper (8.11+)
- Ktor 3.1.3 (Netty) +
kotlinx.serialization - Koog Agents 1.0.0 —
AIAgent, strategy DSL,@Toolreflection - dotenv-kotlin — loads
.envfrom project root
Frontend stack
- React 19 + react-router-dom 7 on Vite 7 + TypeScript 5.8
- axios for
POST /run-testandPOST /stop-test, nativefetchfor/config - Firebase Firestore for scenario persistence
- mermaid for architecture diagram on About page
- Vite dev server proxies
/api/*→http://localhost:8080
LLM executors
All implement ExecutorInfo in agent/executor/<provider>/. Selected via POST /config (executorInfoId string, case-sensitive).
executorInfoId | Class | Env var |
DeepSeekV4Flash (default) | DeepSeekV4FlashExecutor | DEEP_SEEK_KEY |
Gemini3Pro | Gemini3ProExecutor (Gemini 3 Pro Preview) | GEMINI_API_KEY |
Opus47 | Opus47Executor (Claude Opus 4.7) | CLAUDE_API_KEY |
GPT52Pro | GPT52ProExecutor (OpenRouter GPT-5.2 Pro) | OPEN_ROUTER |
QWEN36B | QWEN36BExecutor (local Ollama, Qwen 3 0.6B) | — |
Llama4 | Llama4Executor (local Ollama) | — |
Grok8BExecutor | Grok8BExecutor (local Ollama) | — |
Critical conventions
These behaviors are load-bearing — see docs/ai-agent.md and docs/tools.md for the full reasoning.
- Status-prefixed tool returns. Every
@Toolreturns aStringstarting with one ofOK | TAPPED | VISIBLE | NOT_VISIBLE | NOT_FOUND | AMBIGUOUS | ERROR | TIMEOUT. The system prompt tells the LLM to pattern-match the prefix. Preserve this when adding tools — return strings, never throw. - Device serial pinning.
AdbUtils.runAdb()injects-s <serial>afterconnectDevice()picks a target. Don't bypass it with rawProcessBuilder("adb", …)calls. MAX_TOKENS_THRESHOLD = 8000inTestingStrategy.kt. Lower values trigger compression too aggressively and the agent forgets which step it's on.startTestingScenarioonce, first. The system prompt forbids any "tap launcher to open the app" recovery — launch is handled programmatically. The agent stops immediately after the final-step summary; there is no explicit close step.hideKeyboardusesKEYCODE_BACK(4), notKEYCODE_ESCAPE. Empirically required on the target device; documented inline.
Common commands
./start.sh # Start backend (:8080) + web (:5173) and open browser
./gradlew run # Backend only
./gradlew compileKotlin # Type-check Kotlin
adb devices # Confirm device/emulator visibility
cd web && npm install # Frontend deps
cd web && npm run dev # Vite dev server on :5173 (proxies /api → :8080)
cd web && npm run build # tsc -b && vite build
cd web && npm run lint # ESLintEnvironment
.env at project root (loaded by dotenv-kotlin, gitignored). See .env.example for the template. At minimum one LLM key plus HOME_PATH (where screenshots/recordings are pulled to). For the dashboard, also VITE_FIREBASE_* keys.
Adding things
- New
@Tool— add a method toMobileTestToolswith@Tool+@LLMDescription. Koog reflection picks it up; no registry edits needed. Return a status-prefixed string. - New executor — implement
ExecutorInfoinagent/executor/, then add awhen-branch inMobileTesterConfigAPI.toMobileConfig()and (optionally) an<option>inweb/src/pages/settings/Settings.tsx.
Related repos
- Sample Android app under test: mobile-tester-agent-sample-app
- Background reading: Building an Agentic AI Mobile Tester with Koog and Kotlin
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

