Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计通过

qa-testing-android质量保证测试安卓

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

4,896

周安装

202

GitHub Stars

60

下载量

1,677
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qa-testing-android(质量保证测试安卓)
来源仓库:https://github.com/vasilyu1983/ai-agents-public
仓库路径:skills/qa-testing-android
安装命令:
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill qa-testing-android
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill qa-testing-android

简介

用于辅助测试设计、自动化测试、用例整理和回归验证。

  • 适合编写单元测试、端到端测试、测试计划或根据失败日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据,避免为通过测试而改坏真实逻辑。
  • 涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网或文件读写。

SKILL.md

QA Testing (Android)

Android testing automation with Espresso, UIAutomator, and Compose Testing.

Core References: Android Testing Docs, Espresso, Compose Testing

Quick Reference

TaskCommand
List emulatorsemulator -list-avds
Start emulatoremulator @<avd_name>
List devicesadb devices
Install APKadb install -r <path-to-apk>
Run unit tests./gradlew test
Run instrumented tests (connected)./gradlew connectedAndroidTest
Run instrumented tests (GMD)./gradlew <device><variant>AndroidTest
List GMD tasks`./gradlew tasks --all
Clear app dataadb shell pm clear <applicationId>

Quick Start (2026 Defaults)

  • Prefer Gradle Managed Devices (GMD) + ATD images for CI; use connectedAndroidTest for local ad-hoc runs.
  • Enable test isolation via AndroidX Test Orchestrator for instrumented tests.
  • Disable animations via Gradle testOptions (preferred) instead of per-runner ADB steps.
  • Keep selectors stable: withId() (Views), testTag (Compose), resource-id/content-desc (UIAutomator).

Recommended Gradle defaults for stable instrumented tests (version catalog names vary by project):

android {
    testOptions {
        animationsDisabled = true
        execution = "ANDROIDX_TEST_ORCHESTRATOR"
    }
}

dependencies {
    androidTestUtil(libs.androidx.test.orchestrator)
}

When to Use

  • Debug or stabilize flaky Android UI tests
  • Add Espresso tests for View-based UIs
  • Add Compose UI tests for composables
  • Add UIAutomator tests for system UI or cross-app flows
  • Set up an Android test gate in CI

Inputs to Gather

  • UI stack: Views, Compose, or mixed
  • Test layer: unit, Robolectric, instrumented UI, UIAutomator/system
  • CI target: PR gate vs nightly vs release; emulator vs device farm
  • Device matrix: min/target API, form factors, locales (if relevant)
  • Flake symptoms: timeouts, missing nodes, idling/sync, device-only issues
  • App seams: DI hooks for fakes, feature flags, test accounts/test data

Testing Layers

LayerFrameworkScope
UnitJUnit + MockitoJVM, no Android
Unit (Android)RobolectricJVM, simulated
UI (Views)EspressoInstrumented
UI (Compose)Compose TestingInstrumented
SystemUIAutomatorCross-app

Core Principles (Stability)

Device Matrix

  • Default: emulators for PR gates; real devices for release
  • Cover: min supported API level, target API level, plus tablet/foldable if supported

Flake Control

  • Prefer Gradle testOptions {animationsDisabled = true} for instrumented tests
  • Use AndroidX Test Orchestrator to isolate state and recover from crashes
  • Use IdlingResources / Compose idling + waitUntil instead of sleeps
  • Mock network with MockWebServer (or your DI fake) and avoid live backends
  • Reset app state per test (test account/data, storage, feature flags)

Writing Tests

  • Espresso (Views): open references/espresso-patterns.md
  • Compose: open references/compose-testing.md
  • UIAutomator (system/cross-app): open references/uiautomator.md

Workflows

Add a New UI Test (Instrumented)

  • Pick framework: Espresso (Views) vs Compose Testing vs UIAutomator boundary.
  • Add stable selectors: View id, Compose Modifier.testTag, system resource-id/content-desc.
  • Control externals: fake/mock network + deterministic test data.
  • Add waits: IdlingResources / Compose idling + waitUntil (avoid sleeps).
  • Run locally: ./gradlew connectedAndroidTest (or a single test via runner args).

Diagnose a Flaky Instrumented Test

  • Confirm reproduces: run the test 10x; isolate to one device/API if needed.
  • Remove nondeterminism: network, clock/timezone, locale, feature flags, animations.
  • Replace sleeps with idling/explicit waits; validate your IdlingResource actually idles.
  • Capture artifacts: logcat + screenshot + screen recording for failures.
  • If still flaky, isolate app state (orchestrator + clear data) and bisect the interaction steps.

Add a CI Gate (Preferred: GMD)

  • Configure GMD + ATD images (see references/gradle-managed-devices.md).
  • Run PR gate on a small matrix; expand via groups for nightly/release.
  • Ensure artifacts upload on failure: **/build/reports/androidTests/, screenshots/logcat.

ADB Commands (Triage)

# Screenshot
adb exec-out screencap -p > screenshot.png

# Screen recording
adb shell screenrecord /sdcard/demo.mp4

CI Integration

Preferred: Gradle Managed Devices (GMD). See references/gradle-managed-devices.md.

# .github/workflows/android.yml
name: Android CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          java-version: '17'
          distribution: 'temurin'
      - uses: gradle/actions/setup-gradle@v3
      - run: ./gradlew test pixel6api34DebugAndroidTest

Navigating References

The reference guides are intentionally large; search within them instead of loading everything:

  • rg -n \"^## \" frameworks/shared-skills/skills/qa-testing-android/references/compose-testing.md
  • rg -n \"Idling|waitUntil|Synchronization\" frameworks/shared-skills/skills/qa-testing-android/references/compose-testing.md
  • rg -n \"RecyclerView|Intents\" frameworks/shared-skills/skills/qa-testing-android/references/espresso-patterns.md

Do / Avoid

Do

  • Prefer orchestrator + per-test isolation for instrumented tests
  • Use IdlingResources / waitUntil for async waits
  • Use Robot/Page Object patterns for readability and reuse
  • Run a small device matrix on PRs; expand on nightly/release

Avoid

  • Thread.sleep() for synchronization
  • Tests depending on live network/backends
  • Flaky selectors (localized text, position-only selectors)

Resources

ResourcePurpose
references/espresso-patterns.mdEspresso matchers, actions
references/compose-testing.mdCompose testing guide
references/uiautomator.mdUIAutomator patterns (system UI)
references/gradle-managed-devices.mdManaged Devices for CI
references/screenshot-testing.mdVisual regression for Android
references/test-orchestrator-patterns.mdAndroidX Test Orchestrator patterns
references/android-ci-optimization.mdCI pipeline optimization
data/sources.jsonDocumentation links

Templates

TemplatePurpose
assets/template-android-test-checklist.mdStability checklist

Related Skills

SkillPurpose
software-mobileAndroid development
qa-testing-strategyTest strategy
qa-testing-mobileCross-platform mobile

Fact-Checking

  • Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.
  • Prefer primary sources; report source links and dates for volatile information.
  • If web access is unavailable, state the limitation and mark guidance as unverified.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.72%
按下载量换算482

OpenCode

22.05%
按下载量换算370

Antigravity

16%
按下载量换算268

Gemini CLI

10.66%
按下载量换算179

Cursor

7.86%
按下载量换算132

Codex

3.34%
按下载量换算56

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/vasilyu1983/ai-agents-public --skill qa-testing-android;npx skills add vasilyu1983/ai-agents-public --skill "qa-testing-android" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills