Agent Skillsmidudev/autoskills › android-testing-unit

android-testing-unit

GitHub

用于编写快速聚焦的Android单元测试,覆盖reducer、用例、仓库及状态持有者。指导用户通过界定风险范围、选择验证策略和配置CI流程来确保测试有效性,避免反模式,并提供具体执行命令与官方参考文档。

packages/autoskills/skills-registry/android-testing-unit/SKILL.md midudev/autoskills

Trigger Scenarios

android unit test strategy test viewmodel reducer android repository unit tests android

Install

npx skills add midudev/autoskills --skill android-testing-unit -g -y
More Options

Non-standard path

npx skills add https://github.com/midudev/autoskills/tree/main/packages/autoskills/skills-registry/android-testing-unit -g -y

Use without installing

npx skills use midudev/autoskills@android-testing-unit

指定 Agent (Claude Code)

npx skills add midudev/autoskills --skill android-testing-unit -a claude-code -g -y

安装 repo 全部 skill

npx skills add midudev/autoskills --all -g -y

预览 repo 内 skill

npx skills add midudev/autoskills --list

SKILL.md

Frontmatter
{
    "name": "android-testing-unit",
    "metadata": {
        "tags": [
            "android",
            "testing",
            "unit-tests",
            "verification"
        ],
        "owners": [
            "@android-agent-skills\/maintainers"
        ],
        "version": "0.1.0",
        "category": "quality-release",
        "triggers": {
            "exclude": [
                "ui screenshot only",
                "play store listing",
                "apk alignment"
            ],
            "include": [
                "android unit test strategy",
                "test viewmodel reducer android",
                "repository unit tests android",
                "mock coroutine dependency android",
                "fast test coverage android"
            ]
        },
        "test_targets": [
            "examples\/orbittasks-compose",
            "examples\/orbittasks-xml",
            "benchmarks\/triggers.jsonl"
        ]
    },
    "description": "Write fast, focused Android unit tests for reducers, use cases, repositories, and lifecycle-safe state holders."
}

Android Testing Unit

When To Use

  • Use this skill when the request is about: android unit test strategy, test viewmodel reducer android, repository unit tests android.
  • Primary outcome: Write fast, focused Android unit tests for reducers, use cases, repositories, and lifecycle-safe state holders.
  • Handoff skills when the scope expands:
  • android-testing-ui
  • android-ui-states-validation

Workflow

  1. Scope the risk surface: correctness, security, performance, test depth, or release automation.
  2. Pick the narrowest verification strategy that still catches the likely regressions.
  3. Instrument the workflow so failures are actionable rather than just red.
  4. Run the relevant checks on the showcase apps and packaging outputs.
  5. Capture any residual risk with explicit follow-up work and owner skills.

Guardrails

  • Prefer reproducible checks in CI over one-off local heroics.
  • Fail with a precise remediation path instead of a vague quality gate.
  • Keep secrets, signing material, and production credentials out of examples and fixtures.
  • Treat performance and security work as engineering tasks with evidence, not folklore.

Anti-Patterns

  • Adding more tests without increasing signal.
  • Shipping benchmarks or security scans that no one can reproduce.
  • Hard-coding release credentials into build logic.
  • Using synthetic metrics with no user-impact interpretation.

Examples

Happy path

  • Scenario: Cover reducer and formatter logic in both fixture apps with focused local tests.
  • Command: cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest && cd ../orbittasks-xml && ./gradlew :app:testDebugUnitTest

Edge case

  • Scenario: Mock sync failures and permission-denied branches without instrumentation.
  • Command: cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest

Failure recovery

  • Scenario: Separate unit-testing requests from UI testing or general architecture cleanup.
  • Command: python3 scripts/eval_triggers.py --skill android-testing-unit

Done Checklist

  • The implementation path is explicit, minimal, and tied to the right Android surface.
  • Relevant example commands and benchmark prompts have been exercised or updated.
  • Handoffs to adjacent skills are documented when the request crosses boundaries.
  • Official references cover the chosen pattern and the main migration or troubleshooting path.

Official References

Version History

  • 0ec7253 Current 2026-07-24 20:51

Same Skill Collection

packages/autoskills/skills-registry/accessibility/SKILL.md
packages/autoskills/skills-registry/adev-writing-guide/SKILL.md
packages/autoskills/skills-registry/agents-sdk/SKILL.md
packages/autoskills/skills-registry/android-architecture-clean/SKILL.md
packages/autoskills/skills-registry/android-compose-foundations/SKILL.md
packages/autoskills/skills-registry/android-coroutines-flow/SKILL.md
packages/autoskills/skills-registry/android-di-hilt/SKILL.md
packages/autoskills/skills-registry/android-gradle-build-logic/SKILL.md
packages/autoskills/skills-registry/android-kotlin-core/SKILL.md
packages/autoskills/skills-registry/android-networking-retrofit-okhttp/SKILL.md
packages/autoskills/skills-registry/angular-developer/SKILL.md
packages/autoskills/skills-registry/aspnet-core/SKILL.md
packages/autoskills/skills-registry/aspnet-minimal-api-openapi/SKILL.md
packages/autoskills/skills-registry/astro/SKILL.md
packages/autoskills/skills-registry/azure-ai/SKILL.md
packages/autoskills/skills-registry/bash-defensive-patterns/SKILL.md
packages/autoskills/skills-registry/best-practices/SKILL.md
packages/autoskills/skills-registry/building-native-ui/SKILL.md
packages/autoskills/skills-registry/bun/SKILL.md
packages/autoskills/skills-registry/chrome-extension-development/SKILL.md
packages/autoskills/skills-registry/clerk-android/SKILL.md
packages/autoskills/skills-registry/clerk-astro-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-backend-api/SKILL.md
packages/autoskills/skills-registry/clerk-chrome-extension-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-custom-ui/SKILL.md
packages/autoskills/skills-registry/clerk-expo-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-nextjs-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-nuxt-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-orgs/SKILL.md
packages/autoskills/skills-registry/clerk-react-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-react-router-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-setup/SKILL.md
packages/autoskills/skills-registry/clerk-swift/SKILL.md
packages/autoskills/skills-registry/clerk-tanstack-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-testing/SKILL.md
packages/autoskills/skills-registry/clerk-vue-patterns/SKILL.md
packages/autoskills/skills-registry/clerk-webhooks/SKILL.md
packages/autoskills/skills-registry/cloudflare-deploy/SKILL.md
packages/autoskills/skills-registry/cloudflare/SKILL.md
packages/autoskills/skills-registry/composition-patterns/SKILL.md
packages/autoskills/skills-registry/containerize-aspnetcore/SKILL.md
packages/autoskills/skills-registry/core-data-expert/SKILL.md
packages/autoskills/skills-registry/csharp-docs/SKILL.md
packages/autoskills/skills-registry/csharp-mstest/SKILL.md
packages/autoskills/skills-registry/csharp-nunit/SKILL.md
packages/autoskills/skills-registry/csharp-tunit/SKILL.md
packages/autoskills/skills-registry/csharp-xunit/SKILL.md
packages/autoskills/skills-registry/dart-best-practices/SKILL.md
packages/autoskills/skills-registry/deno-deploy/SKILL.md

Metadata

Files
0
Version
0ec7253
Hash
f215a4b2
Indexed
2026-07-24 20:51

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-08 07:53
浙ICP备14020137号-1 $bản đồ khách truy cập$