run-e2e
Skill6 starsChanged 25 days agoMITView on GitHub
Build PocketPal AI from source in a worktree and run E2E specs against the local build. For testing the CI-built APK of a PR instead, use /run-pr-e2e.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- haowei2000/Cheerstheir own version, first seen Oct 20, 2026
- apache/skywalkingtheir own version, first seen Oct 8, 2026
- DataDog/datadog-agenttheir own version, first seen Oct 8, 2026
- WhatIfWeDigDeeper/application-trackertheir own version, first seen Feb 10, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- apache/skywalking★ 25ksame name
- DataDog/datadog-agent★ 3.8ksame name
- haowei2000/Cheers★ 9same name
- WhatIfWeDigDeeper/application-tracker★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- benchSkill
- figma-implementSkill
- ios-routerSkill
- memory-profileSkill
- pmSkill
- review-l10nSkill
- review-prSkill
- run-pr-e2eSkill
- start-taskSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Verify before starting a run:
- Very specific: line 52
pod install: after any Podfile.lock change (llama.rn upgrades, new native deps).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Run E2E Tests (local build)
You are building PocketPal AI from source in a worktree and running E2E specs against the local build. If the user wants to verify a PR matches the bit-identical artifact CI produced — without a local build — use /run-pr-e2e instead; that skill covers the CI-artifact path and defers to this one for everything generic.
Project facts (not exposed by --help)
- No CI gate on E2E.
.github/workflows/e2e-tests.ymlis a manualworkflow_dispatchthat only uploads the Android APK as an artifact; no specs are executed. Treat "E2E green" claims outside this skill as unverified until reproduced locally. - Android uses a separate
e2eflavor, packagecom.pocketpalai.e2e, output atandroid/app/build/outputs/apk/e2e/releaseE2e/app-e2e-releaseE2e.apk. The prod APK (outputs/apk/release/app-release.apk) is non-debuggable and has thesrc/__automation__/bridge DCE-stripped — specs against it silently no-op. Always build viayarn android:build:e2e, neverassembleRelease. - iOS has no separate flavor. Same bundleId as prod (
ai.pocketpal), differentiated only by the__E2E__define frombabel.config.js: transform-definedriven byE2E_BUILD=true.yarn ios:build:e2eis the only correct build command for sim tests;yarn ios:build:ipafor iOS devices. - Reset behaviour differs across platforms. iOS uses
noReset:false, fullReset:false— install state (including downloaded models) is preserved across runs. Android usesfullReset:true— the app is reinstalled every run and any downloaded model is lost. Plan timing accordingly. e2e/devices.jsonis gitignored and per-worktree, copied from the submodule's local copy bytools/sync-worktree-config.sh; that copy may point AndroidappPathat the prod-release path. Each AndroidappPathmust match the APK under test: the e2e-flavor output (../android/app/build/outputs/apk/e2e/releaseE2e/app-e2e-releaseE2e.apk) for a localyarn android:build:e2e.tools/run-pr-e2e.shrewrites it to the APK it fetched. A wrong path surfaces asWebDriverError: The application at '...' does not exist, even when the build itself succeeded.TIMEOUTS.appReady = 60sine2e/fixtures/models.ts. Most specs block on thechat-inputtestID for 60s before doing anything else. A broken first-paint manifests asno such element 'chat-input'after roughly the appReady timeout.
Available specs
Pick the smallest spec that exercises what changed; default quick-smoke. Core specs live in e2e/specs/*.spec.ts (quick-smoke, load-stress, benchmark-matrix, memory-profile, visual-capture, diagnostic), feature specs in e2e/specs/features/*.spec.ts (thinking, language, draft-autosave, remote-server, talent-tool-use). Read references/specs.md for what each tests and when to use it. benchmark-matrix, memory-profile, tts-memory-profile, visual-capture, and diagnostic are measurement infrastructure, excluded from the /run-pr-e2e default list.
Parse input
Extract from $ARGUMENTS:
- Worktree (optional): if a branch name is given, check it out in a dedicated
./worktrees/E2E-<safe-name>via./tools/create-worktree.sh ... --detach --ref origin/<branch>. Ifmain, use./worktrees/E2E-main. If omitted, use the current task worktree if there is one; otherwise stop and ask the user which worktree. (For the PR-CI-artifact path, redirect to/run-pr-e2e.) - Platform:
ios,android,both(default:both). - Devices:
all/virtual-only/real-only/connected/ comma-separated IDs (runner default:all). - Spec: any basename from the catalogs above (the runner resolves both
specs/andspecs/features/); defaultquick-smoke. - Flags: pass through
--each-model,--each-device,--all-models,--skip-build,--dry-run,--models a,b. Anything else: consultnpx ts-node scripts/run-e2e.ts --help.
Step 1 — Pre-flight
Verify before starting a run:
- Worktree: reuse an existing one for the branch when present; otherwise create with
./tools/create-worktree.sh(--detach --ref origin/<branch>, or--ref origin/mainfor main). Never test insiderepos/pocketpal-ai/— it's a read-only submodule. - Local branch is in sync with origin. Stale checkouts produce results that don't reflect the code being shipped.
- iOS simulator is booted (the runner does not boot it).
- Android emulator or device is attached and showing as
deviceinadb devices. - Phone claimed. Claim a phone through agistry before driving it and release it after (a pipeline stage uses the
DEVICEits orchestrator claimed); iOS runs go throughios-router(this host has no iOS toolchain). - Appium ports 4723 and 4724 are free — the WDIO config spawns Appium on these (see
wdio.{ios,android}.local.conf.ts); a leftover daemon from a previous run causes session creation to hang.
Step 2 — One-time worktree setup
Each fresh worktree needs three project-specific things beyond root yarn install:
e2e/has its ownpackage.json(WDIO + Appium client deps). Runyarn installseparately in that subdirectory.ios/has aGemfilethat pinsxcprettyand the cocoapods version. Install via Bundler beforepod install, otherwiseyarn ios:build:e2efails opaquely — xcpretty swallows the real xcodebuild error.pod installafter anyPodfile.lockchange (llama.rn upgrades, new native deps).
Then verify e2e/devices.json (gitignored, per-worktree, synced on creation). For a local yarn android:build:e2e, each Android appPath must be ../android/app/build/outputs/apk/e2e/releaseE2e/app-e2e-releaseE2e.apk; the synced copy often holds the prod-release path, which fails Android session creation with APK does not exist.
Step 3 — Run the pipeline
Entry point: npx ts-node scripts/run-e2e.ts from inside e2e/. Required flags: --platform <ios|android|both> and --spec <name>. Everything else is documented in --help.
Non-obvious flag semantics:
--dry-runfirst whenever changing platform/devices/spec — it prints the matched targets and per-device WDIO invocations without spending the build budget.--each-deviceis required to iterate over more than one device fromdevices.json. Passing--devices a,balone does not imply--each-device; without it the runner picks the default device only.- Builds are sequential (iOS first, then Android). Cold builds typically run ~10-15 min iOS + ~3-5 min Android per worktree.
Step 4 — Report
Reports land in e2e/reports/<timestamp>/:
summary.json— overall pass/fail + per-device breakdown.junit-results.xml— merged JUnit across devices.<device-id>/[<model-id>/]subdirectories — per-run JUnit +screenshots/failure-*.png.
For each failure, open the per-device subdirectory and look at the failure screenshot and the per-device JUnit before drilling into the spec.
Failure-mode lookup
| Symptom | Likely cause |
WebDriverError: The application at '...app-release.apk' does not exist | e2e/devices.json Android appPath does not match the APK that was built or fetched. Fix the path; the build itself is fine. |
iOS red box No script URL provided. unsanitizedScriptURLString = (null) | The installed app on the sim is a Debug build expecting Metro, not the Release .app from the build. Uninstall and reinstall from the new .app. |
no such element 'chat-input' ~appReady seconds after session start (iOS) | First-paint is broken, or the install on the sim is from a different build than the .app on disk. Confirm install matches build before deeper investigation. |
iOS BUILD FAILED with no error text above it | Bundler gems (specifically xcpretty) are missing in ios/. Install Bundler gems, then retry. |
iOS build succeeds but the .app won't launch after a Podfile.lock change | Pods are stale. Re-run pod install. |
| Android Appium connects but session creation hangs >60s | A stale Appium daemon is holding port 4723/4724. Free the ports and retry. |
| Run times shorter than the spec's workload would imply | iOS preserves install state, so a previously downloaded model short-circuits the download step. Compare timings only with a clean install. |
Notes
- The runner script is
scripts/run-e2e.ts. There is norun-e2e-pipeline.ts. devices.jsonand real-iOS builds (yarn ios:build:ipa, not:e2e): see Project facts 3 and 5.
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.

