Skip to content

20 AI testers on 20 different phones, in parallel, on GitHub's free runners: Claude Code agents on iOS Simulators and Android emulators that find broken flows, translation, layout and accessibility bugs

Summary: group the reports that describe the same bug, and show which personas found which kind of issue

Pierre RAFFALLIcd4ffe8f998b
diff --git a/PRIVACY.md b/PRIVACY.md
index 4601509..0079cf8 100644
--- a/PRIVACY.md
+++ b/PRIVACY.md
@@ -11,6 +11,9 @@ account.
- Test results (reports, screenshots, logs, app builds) are encrypted with your
public key before upload. Only you hold the private key.
- Analytics hosts listed in `block_hosts` are blocked inside the test phones.
+- On your machine, `collect.sh` sends the report titles, screens and severities
+ to Claude through your own Claude Code login, to group duplicate reports.
+ Set `SUMMARY_GROUPING=0` to skip it.
Questions: open an issue at
https://github.com/pierridotite/mobile-agent-testers/issues
diff --git a/README.md b/README.md
index 52ba584..59f66eb 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Multiplatform, Capacitor and .NET MAUI.
- Pixel Tablet in Spanish: the keyboard covers the address dialog's Cancel and Confirm.
- A failed manual send says only "Error", "Erreur", "Fehler", "エラー", "Hata" or "Erro", with no reason. On iOS, an address that doesn't answer leaves the dialog waiting with no progress shown (three agents).
- 103 issues in all (1 blocker, 15 major), 69 minutes from start to the last report (the Free plan runs 5 macOS jobs at a time), $4.62 of model usage for the 20. Run it yourself:
+ 103 reports in all (1 blocker, 15 major), which group into 46 distinct bugs: 29 of them, the blocker included, were found by a single persona. 69 minutes from start to the last report (the Free plan runs 5 macOS jobs at a time), $4.62 of model usage for the 20. Run it yourself:
```bash
gh workflow run agent-testers.yml -f source_repo=localsend/localsend -f app_dir=app \
@@ -48,7 +48,7 @@ Ran it on your app? [Share what it found](https://github.com/pierridotite/mobile
gh repo create my-testers --public --template pierridotite/mobile-agent-testers --clone
cd my-testers && ./setup.sh # key pair + secrets + Claude token (Windows: .\setup.ps1)
gh workflow run agent-testers.yml # demo: 2 Android + 2 iOS testers, ~20 min
-bash scripts/collect.sh <run id> # decrypts reports into runs/<id>/SUMMARY.md
+bash scripts/collect.sh <run id> # decrypts reports, groups duplicates: runs/<id>/SUMMARY.md
```
The demo app has [11 deliberate bugs](demo-app/BUGS.md). On the recorded run above, the 4 demo testers found 9 of them (2 to 7 minutes per agent, about 21 minutes for the whole run, builds included), plus real issues nobody planted (a button under the Android nav bar, no data kept after a relaunch). Model usage: $0.87 for the 4.
@@ -114,6 +114,7 @@ toolkit works. Labelled widgets (Flutter `Semantics`, `contentDescription`,
- **Three tools per agent**: see the screen (with tap coordinates), gestures, typing.
- **Encrypted results**: public repo logs are public, so everything is encrypted with your key.
- **Analytics blocked** inside the phones, so tests never touch your real stats.
+- **One summary** on your machine: Claude groups the reports that describe the same bug, so you see how many personas hit each one and which personas found which kind of issue.
## Limits
diff --git a/plugins/mobile-agent-testers/skills/setup/SKILL.md b/plugins/mobile-agent-testers/skills/setup/SKILL.md
index 45803e8..3724294 100644
--- a/plugins/mobile-agent-testers/skills/setup/SKILL.md
+++ b/plugins/mobile-agent-testers/skills/setup/SKILL.md
@@ -108,7 +108,9 @@ private key stays with them):
bash scripts/collect.sh <run id> # downloads + decrypts into runs/<id>/
```
-Then read `runs/<id>/SUMMARY.md`, then open the screenshots of each important
-issue before you trust it: agents sometimes misread a screen. Check that no
-agent stopped on a usage limit (collect.sh warns). Turn confirmed issues into
-fixes or tickets, most severe first, and say which personas hit each one.
+Then read `runs/<id>/SUMMARY.md` (if the `claude` CLI is installed, reports that
+describe the same bug are grouped, with how many personas hit each one), then
+open the screenshots of each important issue before you trust it: agents
+sometimes misread a screen. Check that no agent stopped on a usage limit
+(collect.sh warns). Turn confirmed issues into fixes or tickets, most severe
+first, and say which personas hit each one.
diff --git a/scripts/summarize.py b/scripts/summarize.py
index dc2c770..a785960 100644
--- a/scripts/summarize.py
+++ b/scripts/summarize.py
@@ -1,27 +1,157 @@
"""Merges every results/<persona>/findings.json of a collected run into one
-Markdown table, most severe first, with how many personas hit each issue.
+Markdown summary, most severe first, with how many personas hit each issue.
+
+Reports that describe the same bug in other words, or in another language, are
+grouped by Claude when the `claude` CLI is installed (your own login, like the
+testers). Only the report titles, screens and severities are sent. Without the
+CLI, or with SUMMARY_GROUPING=0, only identical titles are merged.
Usage: python3 scripts/summarize.py <collected_run_dir>"""
-import json, sys
+import json, os, re, shutil, subprocess, sys
from collections import defaultdict
from pathlib import Path
ORDER = {"blocker": 0, "major": 1, "minor": 2, "cosmetic": 3}
-issues, scores = defaultdict(lambda: {"personas": set(), "sev": None, "where": set()}), []
-for f in Path(sys.argv[1]).glob("*/results/*/findings.json"):
- persona = f.parent.name
- data = json.loads(f.read_text())
- if isinstance(data.get("score"), (int, float)):
- scores.append(data["score"])
- for i in data.get("issues", []):
- k = i.get("title", "?").strip().lower()
- e = issues[k]
- e["title"] = i.get("title", "?")
- e["personas"].add(persona)
- e["where"].add(i.get("screen", ""))
- if ORDER.get(i.get("severity"), 9) < ORDER.get(e["sev"], 9):
- e["sev"] = i.get("severity")
-print(f"# Agent test summary\n\n{len(scores)} reports, average score "
- f"{sum(scores) / len(scores):.1f}/10\n" if scores else "# Agent test summary\n")
-print("| Severity | Issue | Personas | Screen |\n|---|---|---|---|")
-for e in sorted(issues.values(), key=lambda e: (ORDER.get(e["sev"], 9), -len(e["personas"]))):
- print(f"| {e['sev']} | {e['title']} | {len(e['personas'])} ({', '.join(sorted(e['personas']))}) | {', '.join(sorted(w for w in e['where'] if w))} |")
+CLASSES = ["layout and text size", "feedback and errors", "accessibility", "translation",
+ "right to left", "tablet", "system bars", "copy", "visual polish", "crash",
+ "likely test artefact"]
+PROMPT = """Below are bug reports from AI testers. Each tester used the same app on a
+different phone, often in a different language. Group the reports that describe
+the same underlying bug: same screen or element and same cause, even when the
+wording or the language differs. Different elements, strings or screens are
+different bugs, even when they look alike (two mistranslated labels are two bugs).
+For each group, write a short English title and pick one class from this list:
+{classes}.
+Answer with JSON only, in this shape:
+{{"groups": [{{"title": "...", "class": "...", "ids": [1, 4]}}]}}
+Every report id must be in exactly one group.
+
+Reports (id. [persona, severity, screen] title):
+{reports}
+"""
+
+
+def load(run_dir):
+ findings, scores = [], []
+ for f in sorted(Path(run_dir).glob("*/results/*/findings.json")):
+ try:
+ data = json.loads(f.read_text(encoding="utf-8"))
+ except (OSError, ValueError):
+ continue
+ if isinstance(data.get("score"), (int, float)):
+ scores.append(data["score"])
+ for i in data.get("issues", []):
+ findings.append({"id": len(findings) + 1, "persona": f.parent.name,
+ "severity": i.get("severity") or "?",
+ "title": (i.get("title") or "?").strip(),
+ "screen": (i.get("screen") or "").strip()})
+ return findings, scores
+
+
+def group_by_title(findings):
+ groups = {}
+ for f in findings:
+ g = groups.setdefault(f["title"].lower(), {"title": f["title"], "class": "", "ids": []})
+ g["ids"].append(f["id"])
+ return list(groups.values())
+
+
+def as_id(x):
+ try:
+ return int(x)
+ except (TypeError, ValueError):
+ return None
+
+
+def group_with_claude(findings):
+ """Groups the reports with `claude -p`. None when the CLI is missing or its answer is unusable."""
+ exe = shutil.which("claude")
+ if not exe or os.environ.get("SUMMARY_GROUPING", "1") == "0" or len(findings) < 2:
+ return None
+ reports = "\n".join(f'{f["id"]}. [{f["persona"]}, {f["severity"]}, {f["screen"]}] {f["title"]}'
+ for f in findings)
+ print(f"Grouping {len(findings)} reports with Claude...", file=sys.stderr)
+ try:
+ out = subprocess.run([exe, "-p", "--output-format", "json",
+ "--model", os.environ.get("SUMMARY_MODEL", "sonnet")],
+ input=PROMPT.format(classes=", ".join(CLASSES), reports=reports),
+ capture_output=True, text=True, timeout=600)
+ text = json.loads(out.stdout).get("result", "")
+ groups = json.loads(re.search(r"\{.*\}", text, re.S).group(0))["groups"]
+ except Exception as e: # no login, usage limit, timeout, not JSON...
+ print(f"Claude grouping skipped ({type(e).__name__}): identical titles only", file=sys.stderr)
+ return None
+ valid, seen, result = {f["id"] for f in findings}, set(), []
+ for g in groups if isinstance(groups, list) else []:
+ if not isinstance(g, dict):
+ continue
+ ids = [i for i in map(as_id, g.get("ids") or []) if i in valid and i not in seen]
+ if ids:
+ seen.update(ids)
+ result.append({"title": str(g.get("title") or "").strip(),
+ "class": g.get("class") if g.get("class") in CLASSES else "", "ids": ids})
+ if not result:
+ return None
+ by_id = {f["id"]: f for f in findings}
+ return result + [{"title": by_id[i]["title"], "class": "", "ids": [i]} for i in sorted(valid - seen)]
+
+
+def cell(s):
+ return str(s).replace("|", "\\|").replace("\n", " ")
+
+
+def render(findings, scores, groups, by_claude):
+ by_id = {f["id"]: f for f in findings}
+ rows = []
+ for g in groups:
+ fs = [by_id[i] for i in g["ids"]]
+ rows.append({"title": g["title"] or fs[0]["title"], "class": g["class"] or "other", "reports": fs,
+ "personas": sorted({f["persona"] for f in fs}),
+ "sev": min((f["severity"] for f in fs), key=lambda s: ORDER.get(s, 9)),
+ "screens": sorted({f["screen"] for f in fs if f["screen"]})})
+ rows.sort(key=lambda r: (ORDER.get(r["sev"], 9), -len(r["personas"]), r["title"].lower()))
+ personas = sorted({f["persona"] for f in findings})
+ lines = ["# Agent test summary", ""]
+ head = f"{len(findings)} reports from {len(personas)} personas"
+ if scores:
+ head += f", average score {sum(scores) / len(scores):.1f}/10"
+ lines.append(head + ".")
+ if by_claude:
+ alone = sum(len(r["personas"]) == 1 for r in rows)
+ lines.append(f"Claude grouped them into {len(rows)} distinct issues: {alone} found by one persona "
+ f"only, {len(rows) - alone} by several. Open the screenshots before you trust a group.")
+ elif findings:
+ lines.append("Only identical titles are merged: install the claude CLI to group the reports "
+ "that describe the same bug.")
+ extra = (" Class |", "---|") if by_claude else ("", "")
+ lines += ["", "| Severity | Issue | Personas | Screen |" + extra[0], "|---|---|---|---|" + extra[1]]
+ for r in rows:
+ lines.append(f"| {r['sev']} | {cell(r['title'])} | {len(r['personas'])} ({', '.join(r['personas'])}) "
+ f"| {cell(', '.join(r['screens']))} |" + (f" {r['class']} |" if by_claude else ""))
+ if by_claude:
+ classes = defaultdict(lambda: [0, set()])
+ for r in rows:
+ classes[r["class"]][0] += 1
+ classes[r["class"]][1].update(r["personas"])
+ lines += ["", "## Which personas found each class of issue", "",
+ "| Class | Issues | Personas |", "|---|---|---|"]
+ for name, (n, ps) in sorted(classes.items(), key=lambda kv: (-len(kv[1][1]), kv[0])):
+ lines.append(f"| {name} | {n} | {len(ps)} ({', '.join(sorted(ps))}) |")
+ merged = [r for r in rows if len(r["reports"]) > 1]
+ if merged:
+ lines += ["", "## Reports behind each grouped issue", ""]
+ for r in merged:
+ lines.append(f"- **{cell(r['title'])}**")
+ lines += [f" - {f['persona']} ({f['severity']}): {f['title']}" for f in r["reports"]]
+ return "\n".join(lines) + "\n"
+
+
+def main():
+ if len(sys.argv) != 2:
+ sys.exit(__doc__)
+ findings, scores = load(sys.argv[1])
+ groups = group_with_claude(findings)
+ print(render(findings, scores, groups or group_by_title(findings), groups is not None), end="")
+
+
+if __name__ == "__main__":
+ main()