/apk-skills-jeiler:android-testingfrom apk-skills-jeiler
Defines testing standards for Android projects including JUnit 5, Turbine, Mockito/MockK, descriptive backtick test names, parameterized tests, and flow testing patterns. Use when creating, reviewing, or refactoring unit tests for ViewModels, use cases, mappers, calculators, repositories, or other pure Kotlin Android components.
Ships in apk-skills-jeiler. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to create clear, behavior-focused tests for Android code.
Test behavior, not implementation.
Priorities:
Rules:
Use descriptive backtick names:
@Test
fun `When amount is valid then it returns parsed value`() { }
Rules:
Always name the subject being tested sut.
Example:
private lateinit var sut: ExchangeViewModel
Rules:
sut consistently in every test file.Organize tests into four blocks:
Example:
private val repository = mockk<ExampleRepository>()
private val sut = ExampleUseCase(repository)
@Test
fun `when repository returns data then ui state is loaded`() = runTest {
// create objects and mocks
val text = "mocked text"
val textA = "A"
val textB = "B"
val param = mockk<Param>() {
every { this.text } returns text
}
val expected = listOf(textA, textB)
// stub functions
every { repository.getData(param) } returns flowOf(Result.success(listOf(textA, textB)))
// execute tested function
val actual = sut(text)
// assert result
assertEquals(expected = expected, actual = actual.first().getOrThrow())
}
Rules:
expected name for the object expected to be the result.actual name for the resultof the tested function.Prefer complete assertions over partial checks.
Good:
assertEquals(expected = expectedUiState, actual = actualUiState)
Better when collections matter:
assertEquals(expected = expectedItems, actual = actualItems)
Use partial assertions only when the test is explicitly about a small part of the output and the rest is irrelevant.
Rules:
Use the following stack:
runTest for coroutine testsRules:
@Test from JUnit 5.runTest for suspending code and Flow collection.Use Turbine whenever testing Flow or StateFlow behavior.
Common assertions:
awaitItem()awaitComplete()awaitError()expectNoEvents()Example:
@Test
fun `When flow emits values, then it receives them in order`() = runTest {
val flow = flowOf(1, 2, 3)
flow.test {
assertEquals(expected = 1, actual = awaitItem())
assertEquals(expected = 2, actual = awaitItem())
assertEquals(expected = 3, actual = awaitItem())
awaitComplete()
}
}
Rules:
Use parameterized approaches whenever multiple input and output combinations exist.
Prefer:
@ParameterizedTest@MethodSource@CsvSource@EnumSource@TestFactory for dynamic testsUse @TestFactory or dynamic tests when scenarios are naturally data driven and the body should stay compact.
Example:
@TestFactory
fun `When amounts are invalid, then parser returns zero`() = listOf(
"a" to BigDecimal.ZERO,
"" to BigDecimal.ZERO,
).map { (input, expected) ->
dynamicTest("input = $input") {
val actual = sut.parse(input)
assertEquals(expected = expected, actual = actual)
}
}
Rules:
Use runTest for all coroutine based tests.
Rules:
Useful checks:
Test ViewModels through their public API.
Prefer testing:
onActionuiStateuiEventsRules:
Test the input to output contract.
Test exact mapped values.
Test interaction with dependencies and returned domain results.
Rules:
Before merging a test, confirm:
sut is used consistentlyrunTestIf a test is hard to read, hard to extend, or tied too closely to implementation details, rewrite it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
android-testing, junit5, mockk, turbine, unit-testing, kotlin-testing
apk-skills-jeiler@plugins-jeiler is listed by jrivadeneiramejia1-source/plugins-jeiler — review the source before installing
npx claudepluginhub jrivadeneiramejia1-source/plugins-jeiler --plugin apk-skills-jeiler2 plugins ship this exact skill · first indexed Oct 17, 2026
37 skills in this plugin
/adaptiveInstructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto, and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API, and how to preserve UI, navigation, scroll, and media playback state across configuration changes (such as folding/unfolding a foldable, rotating a device, or resizing a window). It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as buttons) with varying target sizes, and adaptive layouts (including navigation areas - nav rails and nav bars) using the Compose Grid and FlexBox APIs. It also covers desktop experiences with keyboard shortcuts, tooltips and custom cursors./android-intent-securityBest practices for Android Intent security. Use this skill when auditing component configurations in AndroidManifest.xml activities, services, receivers) or source code handling incoming Intents (getIntent, getParcelableExtra) to prevent Intent Redirection and unauthorized access./android-patternsDefines all implementation patterns for Android features: Unidirectional Data Flow (UDF), ViewModel design, Flow composition, error handling, repository pattern, domain UseCases, and Compose UI patterns. Use this skill whenever implementing a ViewModel, designing state or action models, writing a repository or UseCase, composing Flows, handling errors, building Compose screens or components, or reviewing code for correctness of reactive patterns or state management.Other plugins' skills for the same job