Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计异常

test-mobile-app测试移动应用程序

Agent Skill

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

总安装

269

周安装

11

GitHub Stars

2

下载量

87
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:test-mobile-app(测试移动应用程序)
来源仓库:https://github.com/biggora/claude-plugins-registry
仓库路径:skills/test-mobile-app
安装命令:
npx skills add https://github.com/biggora/claude-plugins-registry --skill test-mobile-app
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/biggora/claude-plugins-registry --skill test-mobile-app

简介

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

  • 适合编写单元测试、端到端测试或根据日志定位问题。
  • 需确认项目测试框架、运行命令和夹具数据后使用。test-mobile-app 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 涉及浏览器或外部服务时应区分模拟环境与生产环境。
  • 安装方式:通过 npx 从指定 GitHub 仓库添加。

SKILL.md

Mobile App Testing Skill

This skill enables Claude to perform end-to-end mobile application testing:

  1. Analyze the app structure and infer user-facing functionality
  2. Generate use cases from an end-user perspective
  3. Write concrete test scenarios with expected results
  4. Execute tests via Appium + Android emulator (or interpret results statically)
  5. Produce a structured HTML/Markdown test report

Phase 1 — App Analysis

What to collect

Before generating use cases, gather as much context as possible:

  • Source code (Android/Java/Kotlin, iOS/Swift, React Native, Flutter)
  • APK file — use androguard to extract Activity list, permissions, Manifest
  • Screenshots — analyze UI from images
  • Description — what the app does, target audience

APK Analysis (Android)

Read scripts/analyze_apk.py for full script. Quick usage:

python3 scripts/analyze_apk.py path/to/app.apk

Outputs: package name, activities, permissions, strings → feeds into use case generation.

Source Code Analysis

If source is available, scan for:

  • Screen/Activity/Fragment/Page names → each is a potential use case surface
  • Navigation graphs (React Navigation, NavController)
  • API endpoints called (network requests)
  • Form fields, validation logic
  • Authentication flows

Phase 2 — Use Case Generation

Methodology

Think from the perspective of a real end user — not a developer. Ask: *"What would a person actually do with this app?"*

Use case format:

UC-<N>: <Short Title>
Actor: End User
Precondition: <What must be true before this action>
Steps:
  1. <action>
  2. <action>
  ...
Expected outcome: <what the user sees/gets>
Priority: High / Medium / Low

Use Case Categories to Always Cover

  1. Onboarding — first launch, tutorial, permissions prompt
  2. Authentication — registration, login, logout, password reset
  3. Core Feature Flow — the primary value action of the app (1-3 flows)
  4. Data Entry — any form: required fields, validation, error states
  5. Navigation — bottom nav, back button, deep links
  6. Empty States — what happens when there's no data
  7. Error Handling — no internet, server error, invalid input
  8. Settings / Profile — change preferences, update data
  9. Notifications — if the app uses push notifications
  10. Accessibility — basic: is text readable, are tap targets big enough

Aim for 15–30 use cases depending on app complexity.


Phase 3 — Test Scenario Writing

For each use case, write a test scenario:

TEST-<N>: <Title>
Related UC: UC-<N>
Type: Functional | UI | Regression | Smoke
Steps:
  1. Launch app
  2. <specific action with exact input data>
  3. ...
Assertions:
  - Element <locator> is visible
  - Text "<expected>" is displayed
  - Screen navigates to <ScreenName>
  - No crash / error dialog
Expected Result: PASS / FAIL criteria

Test Types to Include

TypeWhen to use
SmokeQuick sanity — does app launch, core screens load?
FunctionalDoes feature X work correctly?
UI/VisualAre elements present, correctly labeled, accessible?
Edge CaseEmpty fields, special characters, very long strings
RegressionAfter a change — did existing features break?

Expo / React Native — Local Backend Setup

When the user's backend runs on the same machine as the development environment, the mobile app cannot use localhost or 127.0.0.1 — on a physical device or emulator, those addresses resolve to the device itself, not the host computer.

Find the host machine's IP

# macOS / Linux
ifconfig | grep "inet " | grep -v 127.0.0.1

# Windows (PowerShell)
ipconfig

Use the LAN IP (e.g. 192.168.1.15). The device and the machine must be on the same Wi-Fi network.

Android emulator shortcut: 10.0.2.2 is a special alias that always points to the host machine, so you don't need the LAN IP when testing on the built-in Android emulator.

Configure the Expo app

Expo supports .env files with the EXPO_PUBLIC_ prefix:

  1. Create .env.local in the project root: EXPO_PUBLIC_API_URL=http://192.168.1.15:5000
  2. Add .env.local to .gitignore (machine-specific setting).
  3. Use the variable in code: ` const response = await fetch(${process.env.EXPO_PUBLIC_API_URL}/users); `

For multi-environment setups, use app.config.js:

// app.config.js
export default ({ config }) => ({
  ...config,
  extra: {
    apiUrl: process.env.EXPO_PUBLIC_API_URL || 'http://localhost:5000',
  },
});
// Access via: Constants.expoConfig.extra.apiUrl  (expo-constants)

Configure the backend

Two things must be set on the server side:

SettingWhy
Bind to 0.0.0.0Default 127.0.0.1 binding rejects requests from outside the loopback interface — the device can't reach it
Allow CORSThe app's origin differs from the server origin; use cors (Express/Node), django-cors-headers (Django), rack-cors (Rails), etc.

Example for Express:

const cors = require('cors');
app.use(cors()); // or restrict to: { origin: 'http://192.168.1.15:8081' }
app.listen(5000, '0.0.0.0', () => console.log('listening on all interfaces'));

Tunneling fallback (ngrok / Expo tunnel)

If direct LAN access fails (VPN, restrictive router, office firewall), use tunneling:

# Expo built-in tunnel (wraps ngrok)
npx expo start --tunnel

This creates a public HTTPS URL that forwards traffic to the local server. It's slower than LAN but works through any network. Update EXPO_PUBLIC_API_URL to the tunnel URL while using it.

Testing checklist for local backend scenarios

  • Backend bound to 0.0.0.0, not 127.0.0.1
  • CORS configured on the server
  • EXPO_PUBLIC_API_URL set to LAN IP (or http://10.0.2.2:<port> for Android emulator)
  • Device and machine on the same Wi-Fi (for physical device)
  • No firewall blocking the backend port on the host machine
  • API endpoints respond to direct curl http://<host-ip>:<port>/health from terminal before running app tests

Phase 4 — Test Execution

Environment Setup

Read references/setup-appium.md for full Appium + emulator setup.

Quick check:

python3 scripts/check_environment.py

This verifies: adb, emulator, Appium server, Python client.

Running Tests

# Run all tests
python3 scripts/run_tests.py --apk path/to/app.apk --output results/

# Run smoke tests only
python3 scripts/run_tests.py --apk path/to/app.apk --suite smoke --output results/

# Run on specific device
python3 scripts/run_tests.py --apk path/to/app.apk --device emulator-5554 --output results/

Test Execution Without Emulator (Static Mode)

If no emulator is available (which is common — most users won't have Appium set up), Claude can still provide significant value:

  1. Analyze source code / screenshots / APK statically
  2. Generate use cases and write all test scenarios
  3. Mark execution status as MANUAL_REQUIRED
  4. Generate a comprehensive report with all test cases ready to be run manually
  5. Provide step-by-step manual testing instructions the user can follow

This is the most common execution path — don't treat it as a fallback. Make the static report just as polished and detailed as the automated one.

Use --static flag:

python3 scripts/run_tests.py --static --tests tests.json --output results/

Phase 5 — Report Generation

python3 scripts/generate_report.py --results results/ --output test_report.html

Report includes:

  • Summary: total tests, passed, failed, skipped
  • Per-test details: steps, assertions, actual vs expected, screenshots
  • Use case coverage matrix
  • Issues found (with severity: Critical / Major / Minor)
  • Environment info (device, OS, app version)

Read references/report-template.md for report structure details.


Workflow Summary

1. Receive app (APK / source / description / screenshots)
        ↓
2. Run analyze_apk.py OR inspect source code
        ↓
3. Generate use cases (UC-1...UC-N) — show to user, ask for feedback
        ↓
4. Write test scenarios (TEST-1...TEST-N) — derive from use cases
        ↓
5. Check environment (check_environment.py)
        ↓
6a. Emulator available → run_tests.py → capture results
6b. No emulator → static mode → mark for manual execution
        ↓
7. generate_report.py → HTML report → present to user

Important Notes

  • Always show use cases to the user before writing tests — they know their app best.
  • Locators: Prefer accessibility id > resource-id > xpath. Never use index-based xpath.
  • Waits: Always use explicit waits (WebDriverWait), never time.sleep.
  • Screenshots: Capture on every assertion failure automatically.
  • Crash detection: After every interaction, check for crash dialogs (the check_for_crash() function in scripts/run_tests.py handles this automatically).
  • Language: Generate use cases and reports in the language the user is using.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Claude

32.98%
按下载量换算29

Codex

32.08%
按下载量换算28

Cursor

18.44%
按下载量换算16

Gemini CLI

9.47%
按下载量换算8

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/biggora/claude-plugins-registry --skill test-mobile-app 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills