本文へスキップ
Skillpedia
モバイルアプリ48k · #3744

android_ui_verification

できること

このツールは、Androidスマートフォンでアプリをテストするのに役立ちます。タップや文字入力をシミュレートし、スクリーンショットを撮ることで、すべてが期待どおりに動作しているかを確認します。

使う場面

  • ✓アプリの見た目の変更が正しく反映されたかを確認するとき。
  • ✓レイアウトや操作に関するバグを自動で見つけたいとき。
  • ✓手動でテストせずに新機能が動作していることを確認したいとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/android_ui_verification/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/android_ui_verification/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“「ログイン」ボタンが表示されているか、そしてそのボタンをクリックできるかを確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、スマートフォンと「会話」するための特別なコマンドを使います。まず画面上でボタンや文字の位置を見つけ、その後、タップや文字入力を再現します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Android UI Verification Skill

This skill provides a systematic approach to testing React Native applications on an Android emulator using ADB commands. It allows for autonomous interaction, state verification, and visual regression checking.

When to Use

  • Verifying UI changes in React Native or Native Android apps.
  • Autonomous debugging of layout issues or interaction bugs.
  • Ensuring feature functionality when manual testing is too slow.
  • Capturing automated screenshots for PR documentation.

🛠 Prerequisites

  • Android Emulator running.
  • adb installed and in PATH.
  • Application in debug mode for logcat access.

🚀 Workflow

1. Device Calibration

Before interacting, always verify the screen resolution to ensure tap coordinates are accurate.

adb shell wm size

Note: Layouts are often scaled. Use the physical size returned as the base for coordinate calculations.

2. UI Inspection (State Discovery)

Use the uiautomator dump to find the exact bounds of UI elements (buttons, inputs).

adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./artifacts/view.xml

Search the view.xml for text, content-desc, or resource-id. The bounds attribute [x1,y1][x2,y2] defines the clickable area.

3. Interaction Commands

  • Tap: adb shell input tap <x> <y> (Use the center of the element bounds).
  • Swipe: adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms> (Used for scrolling).
  • Text Input: adb shell input text "<message>" (Note: Limited support for special characters).
  • Key Events: adb shell input keyevent <code_id> (e.g., 66 for Enter).

4. Verification & Reporting

Visual Verification

Capture a screenshot after interaction to confirm UI changes.

adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./artifacts/test_result.png

Analytical Verification

Monitor the JS console logs in real-time to detect errors or log successes.

adb logcat -d | grep "ReactNativeJS" | tail -n 20

Cleanup

Always store generated files in the artifacts/ folder to satisfy project organization rules.

💡 Best Practices

  • Wait for Animations: Always add a short sleep (e.g., 1-2s) between interaction and verification.
  • Center Taps: Calculate the arithmetic mean of [x1,y1][x2,y2] for the most reliable tap target.
  • Log Markers: Use distinct log messages in the code (e.g., ✅ Action Successful) to make grep verification easy.
  • Fail Fast: If a uiautomator dump fails or doesn't find the expected text, stop and troubleshoot rather than blind-tapping.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
よくある質問

使うために特別な準備は必要ですか?

はい。Androidエミュレーター(パソコン上で動く仮想のスマートフォン)を起動し、「adb」プログラムをインストールしておく必要があります。

ツールはどのようにしてタップする場所を知るのですか?

画面のスクリーンショットを撮り、各ボタンや文字がどこにあるかを解析して、タップすべき正確な位置を計算します。

どんなアプリでもテストできますか?

React NativeまたはネイティブAndroidで作られたアプリで最もよく動作します。また、ログを確認するにはアプリがデバッグモードである必要があります。

詳細

作者による元の説明

Automated end-to-end UI testing and verification on an Android Emulator using ADB.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#3744
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル