understanding-the-testing-pyramid

Installation
SKILL.md

Understanding the Testing Pyramid — Pick the 3-Layer Framing and Stick to It

Android test suites slow CI and rot when teams ship one big instrumented test per behavior and skip unit coverage of the underlying logic. Google's /training/testing/fundamentals page frames test sizing with three scopes — small, medium, big — and the /strategies page sketches a qualitative pyramid on top of that. This skill encodes the 3-layer framing, names the alternative 5-layer framing so authors do not blend them, and is honest about where the famous numeric ratios come from. Subsequent skills (../choosing-what-to-test/SKILL.md, ../../strategies/applying-testing-strategies/SKILL.md) assume this vocabulary.

When to use this skill

  • The user asks "how many unit vs UI tests should I write" or quotes a 70/20/10 / 80/15/5 ratio and asks if it is in Google's docs.
  • The user calls every test "an integration test" / "an end-to-end test" and the agent needs a vocabulary to sort them.
  • The user reports "CI is slow" / "the suite takes 40 minutes" and wants to know whether to delete instrumented tests.
  • The user asks whether Robolectric is "a unit test" or "an integration test" — it is a medium-local test in Google's framing.
  • The user is starting a new module and asks where to begin (answer: small tests first, per /strategies).

When NOT to use this skill

  • The user wants to know what to put in each test (which screens, which ViewModels) — use ../choosing-what-to-test/SKILL.md.
  • The user wants to wire testImplementation vs androidTestImplementation Gradle configurations — use ../../strategies/organizing-test-source-sets/SKILL.md.
  • The user wants to pick between Fake / Mock / Stub / Spy — use ../../doubles/picking-test-doubles/SKILL.md.
  • The user is debugging a single flaky test and wants to fix it — start with ../../../compose/synchronization/synchronizing-with-idle/SKILL.md or ../../../jvm-tests/coroutines/testing-coroutines-with-runtest/SKILL.md.
Installs
36
GitHub Stars
319
First Seen
May 16, 2026
understanding-the-testing-pyramid — skydoves/android-testing-skills