testing-setup

Analyze native Android projects and implement a testing strategy with a Markdown report.

174|8|Updated Jan 9, 2024
One-click install
npx skills add https://github.com/klxiaoniu/QQVersionList --skill testing-setup-klxiaoniu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-setup
Source: https://github.com/klxiaoniu/QQVersionList/tree/main/.agents/skills/testing-setup
Command: npx skills add https://github.com/klxiaoniu/QQVersionList --skill testing-setup-klxiaoniu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Creates a complete, practical testing plan for native Android apps so teams can set up unit tests, UI tests, screenshot tests, and end-to-end tests in a consistent and maintainable way.

Core Features & Use Cases

  • Testing setup audit: Identifies the project’s current testing stack by inspecting dependency/config files and determines whether the app is Compose, Views, or hybrid.
  • Test infrastructure installation: Recommends and installs the right frameworks and rules (unit, behavior UI, screenshot, and E2E) while respecting the existing stack.
  • Test architecture guidance: Advises how to refactor for unit/UI testability using fakes and dependency injection, and where tests should live (test vs androidTest vs screenshotTest).
  • Quality guardrails: Includes guidance for coverage (Jacoco), state restoration verification, device/window-size simulation, and navigation/deeplink test suites.
  • Reporting deliverables: Produces a Markdown report documenting the analysis and the applied testing strategy changes.

Quick Start

Use the testing-setup skill to analyze an existing Android project and generate a full plan for adding unit, UI, screenshot, and end-to-end tests.

Frequently Asked Questions about testing-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up an Android testing infrastructure for a hybrid Compose and Views project?

To set up Android testing infrastructure, the skill inspects your project's dependency and config files to determine if the app uses Compose, Views, or a hybrid architecture, then recommends and installs the appropriate test frameworks and runners.

What is the best way to structure unit tests and behavior UI tests in an existing native Android app?

The best way to structure unit tests and behavior UI tests is to refactor code for testability using fakes and dependency injection, placing tests in the correct source sets like `test` and `androidTest` based on the applied testing strategy.

How do I add screenshot tests and end-to-end journeys to my Android testing stack?

You add screenshot tests and end-to-end journeys by installing the right test frameworks and rules, configuring the `screenshotTest` source sets, and setting up navigation and deeplink test suites alongside state restoration verification.

Does this testing strategy support adding Jacoco coverage and device simulation for Android apps?

Yes, the testing strategy supports Jacoco coverage and device simulation by including quality guardrails that set up coverage tracking, device and window-size simulation, and state restoration verification within the test infrastructure.

Can I use dependency injection to refactor an Android project for better UI testability?

Yes, you can use dependency injection to refactor an Android project for UI testability by replacing real dependencies with fakes and configuring testing rules to isolate UI components and behavior tests effectively.

What deliverables does the Android testing setup skill generate after analyzing a project?

The Android testing setup generates a Markdown report deliverable documenting the analysis of your current testing stack and detailing the applied changes to your test infrastructure, source sets, and frameworks.