android-tdd

Implement Test-Driven Development practices for Android and Kotlin Multiplatform projects.

119|14|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/rcosteira79/android-skills --skill android-tdd-rcosteira79
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-tdd
Source: https://github.com/rcosteira79/android-skills/tree/main/skills/android-tdd
Command: npx skills add https://github.com/rcosteira79/android-skills --skill android-tdd-rcosteira79

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write more reliable and maintainable Android and KMP code by applying Test-Driven Development (TDD) principles tailored to the Android ecosystem.

Core Features & Use Cases

  • Android Testing Tiers: Guides you on choosing the right testing level (Unit, Integration, Instrumented) for your code.
  • Fakes Over Mocks: Promotes the use of hand-written fakes for better test readability and maintainability.
  • Coroutine & Compose Testing: Provides patterns for effectively testing asynchronous code and UI components.
  • Use Case: When developing a new feature, use this skill to ensure all logic is covered by tests before and during implementation, leading to fewer bugs and easier refactoring.

Quick Start

Write a unit test for your ViewModel using runTest and a fake repository.

Frequently Asked Questions about android-tdd

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

FAQPage Schema
How do I test Android coroutines using TDD?

To test Android coroutines using TDD, use the `runTest` API to control virtual time and verify asynchronous behavior. This Skill provides specific patterns for writing reliable tests for suspending functions in Kotlin Multiplatform projects.

What is the best way to test Jetpack Compose UI components?

The best way to test Jetpack Compose UI components is by applying targeted testing patterns to verify state and rendering. This Skill outlines strategies for effectively testing Compose UI within the Android lifecycle.

Should I use fakes or mocks for Android unit testing?

You should use hand-written fakes over mocks for Android unit testing to improve test readability and maintainability. This Skill promotes implementing fake repositories to isolate logic without the overhead of mock frameworks.

How do I choose between unit, integration, and instrumented tests for Android?

Choose between unit, integration, and instrumented tests by evaluating the dependency depth of your code. This Skill guides you through Android's three-tier testing model to select the right testing level.

Does Test-Driven Development work for Kotlin Multiplatform projects?

Test-Driven Development works effectively for Kotlin Multiplatform projects when applying tailored principles. This Skill helps you implement TDD practices to write reliable and maintainable code specifically for the Android and KMP ecosystems.

Why does my Android TDD workflow have so many testing challenges?

Your Android TDD workflow faces testing challenges due to common rationalizations and lifecycle complexities. This Skill addresses these specific Android development hurdles, offering strategies to ensure logic is covered before implementation.