android-tests

Write Android ViewModel and repository unit tests with MockK, Kluent, and Turbine.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/soygabimoreno/Los-ANDROIDES --skill android-tests
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-tests
Source: https://github.com/soygabimoreno/Los-ANDROIDES/tree/main/.agents/skills/android-tests
Command: npx skills add https://github.com/soygabimoreno/Los-ANDROIDES --skill android-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you add or update Android unit tests that match the project's strict conventions, so your ViewModels and repositories are verified reliably and consistently.

Core Features & Use Cases

  • JUnit4 + Kluent assertions: Write readable, expressive assertions for state, events, and error cases.
  • MockK + Turbine testing patterns: Verify repository interactions and test Flow/StateFlow emissions deterministically.
  • Project-specific conventions: Enforce GIVEN/WHEN/THEN naming rules, subject-under-test setup style, and verification helpers like verifyOnce/coVerifyNever.

Quick Start

Use the android-tests skill to implement the required ViewModel test patterns and run the correct unit test task for the updated code.

Frequently Asked Questions about android-tests

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

FAQPage Schema
How do I write unit tests for Android ViewModels using Turbine and MockK?▼

Android ViewModel unit tests use Turbine for deterministic Flow and StateFlow emission assertions, MockK for typed mocking with verifyOnce helpers, and Kluent for readable assertions across success and error paths.

What is the best way to test StateFlow emissions in Android coroutines?▼

Testing StateFlow emissions is best handled using Turbine's awaitItem assertions within runTest blocks to verify deterministic coroutine state changes and event emissions across typical success and error paths.

How do I structure Android unit tests with GIVEN WHEN THEN conventions?▼

Android unit tests use strict GIVEN/WHEN/THEN naming conventions to ensure consistent subject-under-test setup, readable Kluent assertions, and repository interaction verification with MockK helpers like coVerifyNever.

Does this Android testing approach require JUnit4 or JUnit5?▼

This Android testing approach requires JUnit4 tests to maintain project-specific conventions, enforcing consistent MockK usage, Kluent assertions, and Turbine-based Flow testing patterns across ViewModels and repositories.

How do I run Gradle test tasks for specific Android repository modules?▼

You run repository- or module-appropriate Gradle test execution tasks to verify updated unit tests, ensuring deterministic coroutine testing and MockK interaction verification pass for the targeted code.