understanding-the-testing-pyramid

Explain Android small/medium/big test scopes and 70/20/10 ratio attribution.

303|10|Updated May 15, 2026
One-click install
npx skills add https://github.com/skydoves/android-testing-skills --skill understanding-the-testing-pyramid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: understanding-the-testing-pyramid
Source: https://github.com/skydoves/android-testing-skills/tree/main/fundamentals/concepts/understanding-the-testing-pyramid
Command: npx skills add https://github.com/skydoves/android-testing-skills --skill understanding-the-testing-pyramid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps you choose the right mix of small, medium, and big Android tests so your CI stays fast and your suite doesn’t become flaky or unmaintainable.

Core Features & Use Cases

  • Clarifies test scope vs execution location: explains how small/medium/big (scope) is independent from local vs instrumented (execution).
  • Gives you a decision vocabulary: uses Google’s small/medium/big framing and avoids mixing it with the 5-layer Unit/Component/Feature/Application/Release Candidate framing.
  • Fixes common misconceptions: addresses why “Robolectric counts as what” and where the widely cited 70/20/10 rule actually comes from.

Quick Start

Ask the AI to recommend how many small, medium, and big tests you should have based on your current split and whether your tests all run instrumented in CI.

Frequently Asked Questions about understanding-the-testing-pyramid

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

FAQPage Schema
How do I structure my Android testing pyramid to avoid flaky CI?

Robolectric tests are categorized as medium scope tests because they run on the JVM but simulate the Android framework. This distinguishes them from small pure JVM unit tests and big real-device instrumented UI tests.

What is the correct ratio for small, medium, and big Android tests?

Test scope and execution location are independent concepts in Android testing. Scope defines small, medium, or big test boundaries, while execution defines whether tests run locally or instrumented on a real device.

Why does my Android test suite run slow in CI even with mostly unit tests?

Your Android test suite runs slow in CI when tests with small scopes are incorrectly configured to run instrumented. Moving medium and small tests to local JVM execution using Robolectric dramatically improves CI performance.

Do I need to run all Android tests instrumented on a real device?

You do not need to run all Android tests instrumented. Small and medium tests can run locally on the JVM, reserving real-device instrumented execution for big UI and smoke tests to optimize CI speed.