Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/piyushverma0/android-agent-skills/android-testingnpx skills add piyushverma0/android-agent-skills --skill android-testinggit clone --depth 1 https://github.com/piyushverma0/android-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/piyushverma0/android-agent-skills/android-testing)<a href="https://agentmods.dev/skills/piyushverma0/android-agent-skills/android-testing"><img src="https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/android-testing.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00120 | $0.02671 |
| Opus 5 | $0.00060 | $0.01336 |
| Sonnet 5 | $0.00024 | $0.00534 |
| Haiku 4.5 | $0.00012 | $0.00267 |
Grade A, and why
android-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 359 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Android Testing
No tests = not production-ready. These rules cover the complete Android testing stack.
Setup — all testing dependencies
[versions]
junit = "4.13.2"
junitExt = "1.2.1"
coroutinesTest = "1.9.0"
mockk = "1.13.12"
turbine = "1.1.0"
roborazzi = "1.27.0"
hiltTesting = "2.52"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" }
mockk-android = { group = "io.mockk", name = "mockk-android", version.ref = "mockk" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutinesTest" }
turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "turbine" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitExt" }
hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hiltTesting" }
room-testing = { group = "androidx.room", name = "room-testing", version.ref = "room" }
roborazzi = { group = "io.github.takahirom.roborazzi", name = "roborazzi", version.ref = "roborazzi" }
roborazzi-compose = { group = "io.github.takahirom.roborazzi", name = "roborazzi-compose", version.ref = "roborazzi" }
// build.gradle.kts
testImplementation(libs.junit)
testImplementation(libs.mockk)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.turbine)
testImplementation(libs.room.testing)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.hilt.android.testing)
androidTestImplementation(libs.mockk.android)
androidTestImplementation(libs.roborazzi)
androidTestImplementation(libs.roborazzi.compose)
kspAndroidTest(libs.hilt.compiler)
Rule 1: ViewModel tests — pure unit tests
class HomeViewModelTest {
// Replace Main dispatcher with test dispatcher
@get:Rule
val mainDispatcherRule = MainDispatcherRule()
private val fakeRepository = FakeItemRepository()
private lateinit var viewModel: HomeViewModel
@Before
fun setUp() {
viewModel = HomeViewModel(
getItems = GetItemsUseCase(fakeRepository),
toggleFavorite = ToggleFavoriteUseCase(fakeRepository)
)
}
@Test
fun `initial state is Loading`() = runTest {
viewModel.uiState.test {
assertEquals(HomeUiState.Loading, awaitItem())
cancelAndIgnoreRemainingEvents()
}
}
@Test
fun `loads items successfully`() = runTest {
fakeRepository.setItems(listOf(sampleItem))
viewModel.uiState.test {
skipItems(1) // skip Loading
val state = awaitItem()
assertTrue(state is HomeUiState.Success)
assertEquals(1, (state as HomeUiState.Success).items.size)
}
}
@Test
fun `shows error when loading fails`() = runTest {
fakeRepository.setShouldFail(true)
viewModel.uiState.test {
skipItems(1) // skip Loading
assertTrue(awaitItem() is HomeUiState.Error)
}
}
@Test
fun `emits navigation event on item click`() = runTest {
viewModel.events.test {
viewModel.onItemClick("item-123")
assertEquals(HomeEvent.NavigateToDetail("item-123"), awaitItem())
}
}
}
// MainDispatcherRule — required for every ViewModel test
class MainDispatcherRule(
private val dispatcher: TestDispatcher = UnconfinedTestDispatcher()
) : TestWatcher() {
override fun starting(description: Description) {
Dispatchers.setMain(dispatcher)
}
override fun finished(description: Description) {
Dispatchers.resetMain()
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 359 lines · 120 tokens per session scan A 63cc947fce57
android-testing is a skill published in the GitHub repository piyushverma0/android-agent-skills (15 stars, last pushed 4mo ago), licensed MIT. It adds 120 tokens to every session and 2,671 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
android-ui-journey-testing
XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.
test-flutter
Flutter App のテスト実行・静的解析・フォーマット・テスト記述ガイド.
ios-testing
Testing patterns for Swift and SwiftUI apps.
mobile-testing
Android and JVM testing - JUnit5, MockK, Turbine for Flow, and Compose UI testing for unit, integration, and UI tests; also applies to KMP commonTest running on the JVM/Android target. For iOS/Swift tests (XCTest, Swift Testing, XCUITest) use ios-testing. For TDD methodology and the three-tier test model (fake-first…
flutter-testing
Flutter + NestJS 多区域项目测试规范 — Flutter 单元测试(Notifier/Provider + ProviderContainer override)、widget 测试、golden 测试、★ flavor 条件编译测试(cn 不含 Firebase / overseas 不含 JPush 的静态与运行时验证)、多租户隔离测试、AI 扣费 refund 测试、NestJS service 单测(mock Prisma)、e2e(supertest + 测试库)、mocktail/jest mock 约定、覆盖率门禁。.
Android Testing
JUnit + Robolectric unit tests, Compose UI tests, screenshot tests, and Espresso for legacy views.