# robolectric/robolectric

Android Unit Testing Framework

Repository: https://github.com/robolectric/robolectric
Canonical: https://ross.abutalabs.com/products/robolectric
Homepage: https://robolectric.org
Language: Java
License: NOASSERTION
License Family: other
Topics: android, robolectric, java, unit-testing
Last push: 2026-08-26T16:28:20+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 54, longevity 100
- inputs: {"age_days": 5850, "days_push": 7, "days_rel": 225, "gap_med": 64, "n_releases_24m": 6}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6041, forks 1389 (observed 2026-08-28T04:09:34.545457+00:00)

## What it is
Robolectric is the industry-standard unit testing framework for Android that runs tests in a simulated Android environment inside a JVM, avoiding slow and flaky emulators. It supports 14 Android API levels (23 through 36) and integrates with JUnit and Gradle-based Android builds.

## Use cases
- run android unit tests fast without an emulator
- test android activities and ui behavior in the jvm
- speed up tdd for android apps
- simulate android framework behavior in tests
- test across multiple android api levels
- isolate android tests with controlled framework state

## When to choose
- you want fast, reliable android unit tests without emulator overhead
- you need to test android components like activities and views in a jvm sandbox
- you practice tdd on an android project and need second-level test cycles
- you need to run tests against many android api versions

## When to avoid
- you need true instrumentation on real devices or hardware sensors
- you need end-to-end integration tests with real android runtime behavior
- your tests depend on actual emulator-only features like real gpu rendering

## Facets
- artifact type: framework
- maturity: active
- function: testing, e2e-testing, mocking
- domain: mobile-development, testing, android-tools
- platform: jvm, cli
- tags: android, unit-testing, jvm, emulator-free, test-framework, gradle

## Member repositories
- robolectric/robolectric (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:34.545457+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:48:57.880467+00:00, confidence not recorded.
  - readme: https://github.com/robolectric/robolectric (fetched 2026-08-28T04:09:34.545457+00:00, sha f4a39a6af0da)
  - homepage: https://robolectric.org (fetched 2026-08-29T08:45:15.427074+00:00, sha 761dee90c822)
  - site_page: https://robolectric.org/getting-started (fetched 2026-08-29T08:45:15.436331+00:00, sha 509d38b60b88)
- Data as of 2026-08-30T08:39:29.467469+00:00.
