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

Build any framework: Flutter, native, KMP, Capacitor, MAUI, custom or prebuilt

Pierre RAFFALLI9f7c4e73b5fe
diff --git a/.github/workflows/agent-testers.yml b/.github/workflows/agent-testers.yml
index 8edb5a5..6bb0a71 100644
--- a/.github/workflows/agent-testers.yml
+++ b/.github/workflows/agent-testers.yml
@@ -20,6 +20,21 @@ on:
app_id:
description: Android package / iOS bundle id
default: com.example.tinytodo
+ framework:
+ description: auto, flutter, expo, react-native, capacitor, kmp, native or maui
+ default: auto
+ android_build:
+ description: "Custom Android build command or prebuilt download (optional, then set apk_path)"
+ default: ""
+ apk_path:
+ description: Path of the .apk produced by android_build
+ default: ""
+ ios_build:
+ description: "Custom iOS build command or prebuilt download (optional, then set ios_app_path)"
+ default: ""
+ ios_app_path:
+ description: Path of the Simulator .app produced by ios_build
+ default: ""
source_repo:
description: owner/name of the app repo (empty = this repo)
default: ""
@@ -78,15 +93,12 @@ jobs:
with: { node-version: 20 }
- uses: actions/setup-java@v4
with: { distribution: temurin, java-version: "17" }
- - name: Build release APK (log kept private)
+ - name: Build APK (any framework, log kept private)
env:
APP_DIR: ${{ inputs.source_repo != '' && format('src/{0}', inputs.app_dir) || inputs.app_dir }}
- run: |
- mkdir -p results; LOG="$PWD/results/build-android.log"; cd "$APP_DIR"
- { npm ci || npm install; } >>"$LOG" 2>&1
- if [ ! -d android ] && grep -q '"expo"' package.json; then CI=1 npx expo prebuild --platform android --no-install >>"$LOG" 2>&1; fi
- (cd android && ./gradlew assembleRelease --no-daemon >>"$LOG" 2>&1) || { echo "::error::Android build failed (details in the encrypted build log)"; exit 1; }
- cp "$(find android -path '*outputs/apk/release/*.apk' | head -1)" "$GITHUB_WORKSPACE/app.apk"
+ BUILD_COMMAND: ${{ inputs.android_build }}
+ ARTIFACT: ${{ inputs.apk_path }}
+ run: bash scripts/build/android.sh "$APP_DIR" "${{ inputs.framework }}"
- name: Encrypt APK
env: { ARTIFACT_PASSPHRASE: "${{ secrets.ARTIFACT_PASSPHRASE }}" }
run: mkdir -p out && openssl enc -aes-256-cbc -pbkdf2 -salt -in app.apk -out out/app.apk.enc -pass env:ARTIFACT_PASSPHRASE
@@ -116,25 +128,17 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v4
with: { node-version: 20 }
+ - uses: actions/setup-java@v4 # Kotlin Multiplatform builds call Gradle from Xcode
+ with: { distribution: temurin, java-version: "17" }
- name: Latest Xcode
run: sudo xcode-select -s "$(ls -d /Applications/Xcode_*.app | sort -V | tail -1)"
- - name: Build Simulator .app (arm64 only, unsigned, log kept private)
+ - name: Build Simulator .app (any framework, arm64, unsigned, log kept private)
env:
APP_DIR: ${{ inputs.source_repo != '' && format('src/{0}', inputs.app_dir) || inputs.app_dir }}
- run: |
- mkdir -p results; LOG="$PWD/results/build-ios.log"; cd "$APP_DIR"
- { npm ci || npm install; } >>"$LOG" 2>&1
- if [ ! -d ios ] && grep -q '"expo"' package.json; then CI=1 npx expo prebuild --platform ios --no-install >>"$LOG" 2>&1; fi
- (cd ios && pod install >>"$LOG" 2>&1) || true
- WS=$(ls -d ios/*.xcworkspace | head -1); SCHEME=$(basename "$WS" .xcworkspace)
- # Hosted Macs are Apple Silicon: arm64 only halves the build time and
- # avoids Swift compiler crashes seen on x86_64 slices of some pods.
- xcodebuild -workspace "$WS" -scheme "$SCHEME" -configuration Release -sdk iphonesimulator \
- -destination 'generic/platform=iOS Simulator' -derivedDataPath build \
- EXCLUDED_ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES CODE_SIGNING_ALLOWED=NO build >>"$LOG" 2>&1 \
- || { echo "::error::iOS build failed (details in the encrypted build log)"; exit 1; }
- APP=$(find build/Build/Products/Release-iphonesimulator -maxdepth 1 -name '*.app' | head -1)
- tar czf "$GITHUB_WORKSPACE/app-ios.tgz" -C "$(dirname "$APP")" "$(basename "$APP")"
+ BUILD_COMMAND: ${{ inputs.ios_build }}
+ ARTIFACT: ${{ inputs.ios_app_path }}
+ IOS_SCHEME: ${{ vars.IOS_SCHEME }} # optional repo variable, for projects with several schemes
+ run: bash scripts/build/ios.sh "$APP_DIR" "${{ inputs.framework }}"
- name: Encrypt .app
env: { ARTIFACT_PASSPHRASE: "${{ secrets.ARTIFACT_PASSPHRASE }}" }
run: mkdir -p out && openssl enc -aes-256-cbc -pbkdf2 -salt -in app-ios.tgz -out out/app-ios.tgz.enc -pass env:ARTIFACT_PASSPHRASE
diff --git a/README.md b/README.md
index df00f7f..f79a341 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,8 @@
Each tester is a Claude Code agent with its own iOS Simulator or Android
emulator on GitHub Actions. It plays a persona, uses your app like a new user
-and writes a bug report with screenshots.
+and writes a bug report with screenshots. Flutter, React Native, Expo, native
+Kotlin and Swift, Kotlin Multiplatform, Capacitor and .NET MAUI.
[![Stars](https://img.shields.io/github/stars/pierridotite/mobile-agent-testers?style=flat)](https://github.com/pierridotite/mobile-agent-testers/stargazers)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
@@ -40,12 +41,28 @@ gh workflow run agent-testers.yml -f source_repo=you/app -f app_id=com.you.app \
| Input | |
|---|---|
| `source_repo`, `ref` | App repo and branch (empty = this repo). Private repo: add a read-only `SOURCE_REPO_TOKEN` secret |
-| `app_dir`, `app_id` | Folder with package.json, Android package / iOS bundle id |
+| `app_dir`, `app_id` | App folder, Android package / iOS bundle id |
| `android_personas`, `ios_personas` | Ids from [personas.json](personas.json), one phone each |
| `brief` | Agent instructions ([AGENT_BRIEF.md](AGENT_BRIEF.md)) |
+| `framework` | `auto` (default) or force one of the frameworks below |
+| `android_build` + `apk_path`, `ios_build` + `ios_app_path` | Your own build command, or a download of a prebuilt app (paths relative to `app_dir`) |
| `block_hosts` | Analytics hosts blocked during tests |
-Works with Expo and React Native. For native or Flutter, change the two build steps.
+**Supported out of the box** (detected automatically):
+
+| Framework | Android | iOS Simulator |
+|---|---|---|
+| Flutter | `flutter build apk` | `flutter build ios --simulator` |
+| React Native / Expo | Gradle release | Xcode, arm64 |
+| Native Kotlin / Java, Swift / Objective-C | Gradle debug | Xcode, arm64 |
+| Kotlin Multiplatform | Gradle debug | Xcode project of the iOS app |
+| Capacitor / Ionic | Gradle debug after `cap sync` | Xcode after `cap sync` |
+| .NET MAUI (beta) | `dotnet publish` | `dotnet build` for `iossimulator-arm64` |
+| Anything else | `android_build` + `apk_path` | `ios_build` + `ios_app_path` |
+
+Agents read the screen from screenshots and the accessibility tree, so any UI
+toolkit works. Labelled widgets (Flutter `Semantics`, `contentDescription`,
+`accessibilityLabel`) give them more precise tap targets.
## How it works
diff --git a/plugins/mobile-agent-testers/skills/setup/SKILL.md b/plugins/mobile-agent-testers/skills/setup/SKILL.md
index 99e0f60..61f8d5a 100644
--- a/plugins/mobile-agent-testers/skills/setup/SKILL.md
+++ b/plugins/mobile-agent-testers/skills/setup/SKILL.md
@@ -1,6 +1,6 @@
---
name: setup
-description: Set up and run parallel AI testers for an iOS/Android app - one headless Claude Code agent per iOS Simulator or Android emulator, each with a persona and a different device, on GitHub Actions, with encrypted reports.
+description: Set up and run parallel AI testers for an iOS/Android app (Flutter, React Native, Expo, native, KMP, Capacitor, MAUI) - one headless Claude Code agent per iOS Simulator or Android emulator, each with a persona and a different device, on GitHub Actions, with encrypted reports.
---
# Set up mobile agent testers
@@ -61,9 +61,13 @@ If the app repo is private, have the user create a fine-grained token with
Contents: read on that one repo and store it with
`gh secret set SOURCE_REPO_TOKEN`.
-The build handles Expo (prebuild) and bare React Native. For a native
-Android/iOS app or Flutter, adapt the two build steps so they output
-`app.apk` and a zipped Simulator `.app`.
+The build detects the framework (`scripts/build/detect.sh`): Flutter, Expo,
+React Native, Capacitor/Ionic, Kotlin Multiplatform, native Kotlin/Java and
+Swift/Objective-C, .NET MAUI (beta). Force it with `-f framework=<name>` if
+detection is wrong. For anything else, or to test an app that is already
+built, pass `android_build` + `apk_path` and `ios_build` + `ios_app_path`
+(a build command or a download; paths relative to `app_dir`). For a native
+iOS project with several schemes, set the repo variable: `gh variable set IOS_SCHEME --body <scheme>`.
## 4. Personas and brief
diff --git a/scripts/build/android.sh b/scripts/build/android.sh
new file mode 100755
index 0000000..7aac327
--- /dev/null
+++ b/scripts/build/android.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+# Builds an APK that installs on an emulator, for any supported framework.
+# Usage: bash scripts/build/android.sh <app dir> <framework|auto>
+# Env (optional): BUILD_COMMAND + ARTIFACT (custom build or prebuilt app)
+# Output: $GITHUB_WORKSPACE/app.apk. All tool output goes to results/build-android.log
+set -uo pipefail
+ROOT=${GITHUB_WORKSPACE:-$PWD}; mkdir -p "$ROOT/results"; LOG="$ROOT/results/build-android.log"
+cd "$1" || exit 1
+FW=$2; [ "$FW" = auto ] && FW=$(bash "$ROOT/scripts/build/detect.sh")
+echo "Framework: $FW"
+q() { "$@" >>"$LOG" 2>&1; }
+fail() { echo "::error::Android build failed ($FW): see the encrypted build log"; exit 1; }
+npm_install() { [ -f package.json ] && { q npm ci || q npm install; }; return 0; }
+apk() { find "${1:-.}" -path "*build/outputs/apk/*$2*/*.apk" -not -name '*androidTest*' -not -name '*unaligned*' | head -1; }
+
+if [ -n "${BUILD_COMMAND:-}" ]; then
+ FW=custom; q bash -c "$BUILD_COMMAND" || fail; OUT=${ARTIFACT:?ARTIFACT (path of the .apk) is required with BUILD_COMMAND}
+else case "$FW" in
+ flutter)
+ if ! command -v flutter >/dev/null; then
+ q git clone --depth 1 -b stable https://github.com/flutter/flutter.git "$RUNNER_TEMP/flutter"; export PATH="$RUNNER_TEMP/flutter/bin:$PATH"
+ fi
+ q flutter pub get && q flutter build apk --release || fail
+ OUT=build/app/outputs/flutter-apk/app-release.apk ;;
+ expo)
+ npm_install; q env CI=1 npx expo prebuild --platform android --no-install || fail
+ (cd android && q ./gradlew assembleRelease --no-daemon) || fail; OUT=$(apk android release) ;;
+ react-native)
+ npm_install; (cd android && q ./gradlew assembleRelease --no-daemon) || fail; OUT=$(apk android release) ;;
+ capacitor)
+ # Release APKs are unsigned in a fresh Capacitor project: the debug APK is self-contained
+ npm_install; q npm run build --if-present; q npx cap sync android || fail
+ (cd android && q ./gradlew assembleDebug --no-daemon) || fail; OUT=$(apk android debug) ;;
+ maui)
+ TF=$(grep -ohE 'net[0-9.]+-android' ./*.csproj | head -1)
+ q dotnet workload install maui-android && q dotnet publish -f "$TF" -c Release -p:AndroidPackageFormat=apk -o "$RUNNER_TEMP/maui" || fail
+ OUT=$(find "$RUNNER_TEMP/maui" -name '*-Signed.apk' | head -1) ;;
+ kmp|native)
+ D=.; [ -x ./gradlew ] || D=android
+ (cd "$D" && chmod +x gradlew && q ./gradlew assembleDebug --no-daemon) || fail; OUT=$(apk "$D" debug) ;;
+ *) echo "::error::Unknown framework $FW"; exit 1 ;;
+esac; fi
+[ -n "${OUT:-}" ] && [ -f "$OUT" ] || { echo "::error::No APK found after the $FW build"; exit 1; }
+cp "$OUT" "$ROOT/app.apk"; echo "APK ready ($FW)"
diff --git a/scripts/build/detect.sh b/scripts/build/detect.sh
new file mode 100755
index 0000000..7ef7279
--- /dev/null
+++ b/scripts/build/detect.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# Prints the framework of the app in the current folder:
+# flutter | expo | react-native | capacitor | maui | kmp | native
+set -uo pipefail
+if [ -f pubspec.yaml ]; then echo flutter
+elif ls capacitor.config.* >/dev/null 2>&1; then echo capacitor
+elif [ -f package.json ] && grep -q '"expo"' package.json && [ ! -d android ] && [ ! -d ios ]; then echo expo
+elif [ -f package.json ] && grep -q '"react-native"' package.json; then echo react-native
+elif ls ./*.csproj >/dev/null 2>&1 && grep -qi 'UseMaui' ./*.csproj; then echo maui
+elif grep -qsE 'multiplatform|kotlin\("multiplatform"\)|kotlinMultiplatform' build.gradle.kts settings.gradle.kts */build.gradle.kts 2>/dev/null; then echo kmp
+else echo native
+fi
diff --git a/scripts/build/ios.sh b/scripts/build/ios.sh
new file mode 100755
index 0000000..ce3878f
--- /dev/null
+++ b/scripts/build/ios.sh
@@ -0,0 +1,57 @@
+#!/usr/bin/env bash
+# Builds an iOS Simulator .app (arm64, unsigned) for any supported framework.
+# Usage: bash scripts/build/ios.sh <app dir> <framework|auto>
+# Env (optional): BUILD_COMMAND + ARTIFACT (custom build or prebuilt .app), IOS_SCHEME
+# Output: $GITHUB_WORKSPACE/app-ios.tgz. All tool output goes to results/build-ios.log
+set -uo pipefail
+ROOT=${GITHUB_WORKSPACE:-$PWD}; mkdir -p "$ROOT/results"; LOG="$ROOT/results/build-ios.log"
+cd "$1" || exit 1
+FW=$2; [ "$FW" = auto ] && FW=$(bash "$ROOT/scripts/build/detect.sh")
+echo "Framework: $FW"
+q() { "$@" >>"$LOG" 2>&1; }
+fail() { echo "::error::iOS build failed ($FW): see the encrypted build log"; exit 1; }
+npm_install() { [ -f package.json ] && { q npm ci || q npm install; }; return 0; }
+# xcodebuild for the Simulator, arm64 only (hosted Macs are Apple Silicon: twice
+# as fast, and no Swift compiler crash on x86_64 slices of some pods)
+xcbuild() { # $1 = folder holding the .xcworkspace / .xcodeproj
+ local dir=$1 c s
+ c=$(find "$dir" -maxdepth 2 -name '*.xcworkspace' -not -path '*/Pods/*' -not -path '*.xcodeproj/*' | head -1)
+ if [ -n "$c" ]; then set -- -workspace "$c"; else c=$(find "$dir" -maxdepth 2 -name '*.xcodeproj' -not -path '*/Pods/*' | head -1); set -- -project "$c"; fi
+ [ -n "$c" ] || fail
+ s=${IOS_SCHEME:-$(xcodebuild "$@" -list -json 2>/dev/null | python3 -c "import json,sys;d=json.load(sys.stdin);d=d.get('workspace') or d.get('project');print(d['schemes'][0])")}
+ q xcodebuild "$@" -scheme "$s" -configuration "${IOS_CONFIGURATION:-Release}" -sdk iphonesimulator \
+ -destination 'generic/platform=iOS Simulator' -derivedDataPath "$RUNNER_TEMP/dd" \
+ EXCLUDED_ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES CODE_SIGNING_ALLOWED=NO build || fail
+ OUT=$(find "$RUNNER_TEMP/dd/Build/Products" -maxdepth 2 -path '*iphonesimulator/*.app' -not -name '*Tests*' | head -1)
+}
+
+if [ -n "${BUILD_COMMAND:-}" ]; then
+ FW=custom; q bash -c "$BUILD_COMMAND" || fail; OUT=${ARTIFACT:?ARTIFACT (path of the .app) is required with BUILD_COMMAND}
+else case "$FW" in
+ flutter)
+ if ! command -v flutter >/dev/null; then
+ q git clone --depth 1 -b stable https://github.com/flutter/flutter.git "$RUNNER_TEMP/flutter"; export PATH="$RUNNER_TEMP/flutter/bin:$PATH"
+ fi
+ # Flutter only builds debug for the Simulator; it runs standalone there
+ q flutter pub get && q flutter build ios --simulator --debug || fail
+ OUT=$(find build/ios/iphonesimulator -maxdepth 1 -name '*.app' | head -1) ;;
+ expo)
+ npm_install; q env CI=1 npx expo prebuild --platform ios --no-install || fail
+ (cd ios && q pod install) || true; xcbuild ios ;;
+ react-native)
+ npm_install; (cd ios && q pod install) || true; xcbuild ios ;;
+ capacitor)
+ npm_install; q npm run build --if-present; q npx cap sync ios || fail
+ [ -f ios/App/Podfile ] && (cd ios/App && q pod install); xcbuild ios/App ;;
+ maui)
+ TF=$(grep -ohE 'net[0-9.]+-ios' ./*.csproj | head -1)
+ q dotnet workload install maui-ios && q dotnet build -f "$TF" -c Debug -p:RuntimeIdentifier=iossimulator-arm64 || fail
+ OUT=$(find bin -path '*iossimulator-arm64*' -name '*.app' -maxdepth 6 | head -1) ;;
+ kmp)
+ xcbuild "$(dirname "$(find . -maxdepth 3 -name '*.xcodeproj' -not -path '*/Pods/*' | head -1)")" ;;
+ native)
+ [ -f Podfile ] && q pod install; [ -f ios/Podfile ] && (cd ios && q pod install); xcbuild . ;;
+ *) echo "::error::Unknown framework $FW"; exit 1 ;;
+esac; fi
+[ -n "${OUT:-}" ] && [ -d "$OUT" ] || { echo "::error::No Simulator .app found after the $FW build"; exit 1; }
+tar czf "$ROOT/app-ios.tgz" -C "$(dirname "$OUT")" "$(basename "$OUT")"; echo "Simulator app ready ($FW)"