capturing-screenshots-and-screenrecord

Community

Capture device screenshots and failure videos

Authorskydoves
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the problem of needing reliable visual evidence (screenshots and screen recordings) to debug and reproduce Android test failures, especially in CI, where artifacts must be captured correctly and correlated with logs.

Core Features & Use Cases

  • PNG screenshot capture (screencap): Captures PNGs via adb shell screencap -p, including the correct streamed form using adb exec-out to avoid binary corruption.
  • Screen recording (screenrecord): Records MP4 clips via adb shell screenrecord with practical flags such as --size, --bit-rate, --time-limit (bounded to 180s), --rotate, and --bugreport.
  • Capture-on-failure automation: Implements a JUnit4 TestWatcher rule to automatically grab a screencap and a logcat -d dump when a test fails for targeted triage.
  • Use Case: When a flaky instrumentation test fails in CI, use this skill to capture the exact final frame as a PNG and attach a matching logcat dump for fast root-cause analysis and golden image generation.

Quick Start

Ask an AI agent to help you capture a PNG screenshot and a logcat dump for a failing instrumentation test using adb exec-out screencap -p and a JUnit4 TestWatcher rule.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: capturing-screenshots-and-screenrecord
Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#capturing-screenshots-and-screenrecord

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.