Chuyển đến nội dung
Skillpedia
Ứng dụng di động48k · #3744

android_ui_verification

Skill này làm gì

Công cụ này giúp kiểm thử ứng dụng trên điện thoại Android của bạn. Nó mô phỏng thao tác chạm, nhập văn bản và chụp ảnh màn hình để kiểm tra mọi thứ có hoạt động như mong đợi không.

Khi nào nên dùng

  • ✓Khi cần xác minh các thay đổi trực quan trong ứng dụng có hoạt động đúng không.
  • ✓Khi tự động phát hiện lỗi bố cục hoặc tương tác.
  • ✓Khi đảm bảo một tính năng mới hoạt động mà không cần kiểm thử thủ công.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/android_ui_verification/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra xem nút 'Login' có xuất hiện và tôi có thể nhấp vào nó không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng các lệnh đặc biệt để “giao tiếp” với điện thoại. Trước tiên, nó tìm vị trí các nút và văn bản trên màn hình, sau đó mô phỏng thao tác chạm và gõ phím của bạn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.
Câu hỏi thường gặp

Tôi có cần thứ gì đặc biệt để dùng công cụ này không?

Có, bạn cần một trình giả lập Android (một điện thoại ảo trên máy tính) đang chạy và chương trình “adb” đã được cài đặt.

Công cụ biết nhấp vào đâu bằng cách nào?

Nó chụp ảnh màn hình và phân tích vị trí của từng nút hoặc văn bản, rồi tính toán chính xác điểm cần chạm.

Nó có thể kiểm thử mọi ứng dụng không?

Nó hoạt động tốt nhất với ứng dụng được xây dựng bằng React Native hoặc Android gốc, và ứng dụng cần ở chế độ debug để xem log.

Chi tiết

Mô tả gốc của tác giả

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

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#3744
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự