بنقرة واحدة
appium-test-debug
Appium failure triage for flaky tests, locators, waits, sessions, and stability.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Appium failure triage for flaky tests, locators, waits, sessions, and stability.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | appium-test-debug |
| description | Appium failure triage for flaky tests, locators, waits, sessions, and stability. |
Systematic troubleshooting for failing or flaky Appium tests in the RIPDPI suite.
Work through in order -- stop at the first failure:
curl -s http://127.0.0.1:4723/status | jq .value.readyadb devices -l (should show at least one device)adb shell pm list packages | grep ripdpistart_route value in Route.kt sealed classapp/src/main/kotlin/com/poyka/ripdpi/ui/testing/RipDpiTestTags.kt and docs/automation/selector-contract.md, then confirm the tag is actually attached in Compose sourceappium-automation-contract skill| Symptom | Cause | Fix |
|---|---|---|
NoSuchElementException | Element not on screen, wrong tag, or needs scroll | Verify tag matches Modifier.testTag() in Compose source. Use scroll_to() if below viewport. |
TimeoutException from wait_for | Screen didn't load or element not rendered | Check automation contract params -- wrong start_route or data_preset. Increase timeout for slow emulators. |
StaleElementReferenceException | Compose recomposition invalidated element reference | Re-find the element after any action that triggers recomposition. Don't store element references across interactions. |
| Session creation fails | Appium server down, UiAutomator2 driver missing, or no device | Run triage checklist steps 1-3. Install driver: appium driver install uiautomator2. |
| Passes locally, fails in CI | Animation timing, slower emulator, permission state | Verify disable_motion=True in marker. Check CI emulator specs. Increase timeout if needed. |
| Wrong screen appears | Incorrect start_route or route not handled in contract | Verify route exists in Kotlin Route class. Check data_preset matches screen requirements. |
| Element found but tap has no effect | Element overlapped by another, or animation in progress | Wait for animations to settle. Check if a dialog/overlay is blocking. Use wait_for before tap. |
Step-by-step:
for i in {1..5}; do pytest tests/test_XX.py::test_name -v; done
reset_state=True in marker.disable_motion=True.appium/screenshots/{test_name}.png show what was actually displayed.print(driver.page_source) temporarily to dump the XML tree and search for the expected resource-id.# In test or debug session:
source = driver.page_source
assert "com.poyka.ripdpi:id/{tag}" in source, f"Tag '{tag}' not in element tree"
adb shell uiautomator dump /sdcard/ui.xml
adb pull /sdcard/ui.xml
rg "resource-id" ui.xml # Search for specific IDs
# Find which composable sets the testTag
rg '{tag}|RipDpiTestTags\\.' app/src/main/kotlin/
If the tag is not found, the composable is missing Modifier.testTag("{tag}") -- this is the root cause and must be fixed in the Kotlin source, not the test.
The conftest.py fixture saves screenshots on failure:
appium/screenshots/{test_name}.pnglaunch_app fixture when rep_call.failed is True| Problem | Solution |
|---|---|
| Element appears after animation | Use wait_for(tag, timeout=10) not find(tag) |
| Element appears after network call | Increase to wait_for(tag, timeout=15) |
| Element below viewport | Use scroll_to(tag) before interacting |
| Element disappears after action | Use is_visible(tag, timeout=3) with assert not |
| Screen takes long to load | Only increase timeout in conftest.py launch wait (15s), not in individual tests |
| Element exists in DOM but not rendered | Use is_visible() which checks presence, not just DOM |
| Mistake | Fix |
|---|---|
Adding time.sleep() to fix timing | Use wait_for() or is_visible() with appropriate timeout |
| Increasing all timeouts globally | Identify the specific slow element and adjust only that call |
Ignoring reset_state=True | Stale state from previous test causes cascading failures |
| Catching exceptions to hide failures | Let exceptions propagate; fix the root cause |
| Re-running flaky test without diagnosis | Classify the failure type first (timing/state/animation) |
.github/skills/appium-automation-contract/SKILL.md -- Preset values and launch flow.github/skills/appium-test-authoring/SKILL.md -- Conventions for writing tests and page objects.github/skills/android-device-debug/SKILL.md -- ADB commands, logcat, emulator managementUse this skill to generate well-branded interfaces and assets for RIPDPI (an Android-native, Compose-first VPN and DPI-bypass app), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, brand-ship icons, and an interactive UI kit of every public composable from the live ui/components tree.
Use when managing the Rust workspace, adding/removing crates, editing workspace dependencies, running cargo nextest/audit/deny, configuring Cargo profiles for Android cross-compilation, debugging Cargo.lock churn, migrating crate edition, or wiring Gradle to cargo via the ripdpi.android.rust-native plugin.
Use when modifying the diagnostics scan pipeline, ScanRequest/ScanReport types, ProbeTask families, ripdpi-monitor-engine / ripdpi-diagnostics-* crates, strategy-probe candidates, the diagnostics catalog (packs/profiles), wire-schema contracts between Rust and Kotlin, DIAGNOSTICS_ENGINE_SCHEMA_VERSION, golden contract tests, or adding a new probe type / profile. Triggers on diagnostics scans, strategy probes, automatic audit, dpi-detector profiles, or anything in core/diagnostics or native/rust/crates/ripdpi-monitor-*.
Android-specific Rust build, verification, and packaging — per-target 16 KiB page alignment, size-optimized release profile, ELF symbol allowlist, .so size budgets, NDK 29 specifics. Use when modifying .cargo/config.toml for Android targets, the workspace [profile.release] / [profile.android-jni] block, or when verifying a built .so before release.
Telemetry and observability discipline for the RIPDPI Android Rust stack — control-plane vs data-plane logging, bounded flume event queues, atomic counters, snapshot polling, readiness callbacks, and deterministic JSON contracts. Use when authoring or modifying telemetry emission code, the bounded event ring, the Kotlin-side telemetry consumer, or any per-packet logging.
Custom detekt rules, DI/privacy/suppression guardrails, detekt.yml configuration, and false-positive triage.