android-unit-testing

Installation
SKILL.md

Android Unit Testing Excellence ๐Ÿงช๐Ÿ›ก๏ธ

The ultimate guide to writing robust, reliable, and maintainable unit tests for Android applications using modern tools like MockK, Turbine, and Coroutine Test.

โšก When to Use

  • Business Logic Verification: Testing Use Cases or ViewModels.
  • Data Layer Testing: Testing Repositories or Data Sources (with Fakes).
  • Reactive Stream Testing: Verifying emitted values from Flow and StateFlow.
  • Logic Refactoring: Ensuring no regressions during code changes.
  • TDD (Test-Driven Development): Writing tests before implementation.

๐Ÿ—๏ธ Core Tools

1. JUnit 5 (Modern Standard)

  • Use @Test, @BeforeEach, and @DisplayName for clear tests.
  • Rule: Prefer JUnit 5 for new projects, but JUnit 4 is common in legacy.
Installs
12
GitHub Stars
11
First Seen
Aug 6, 2026