# google/truth

Fluent assertions for Java and Android

Repository: https://github.com/google/truth
Canonical: https://ross.abutalabs.com/products/truth
Homepage: https://truth.dev/
Language: Java
License: Apache-2.0
License Family: permissive
Topics: java, truth, unit-testing, test-framework, testing-library, assertion-framework, junit
Last push: 2026-08-10T22:24:48+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 15, longevity 100
- inputs: {"age_days": 5551, "days_push": 23, "days_rel": 357, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2787, forks 273 (observed 2026-08-28T04:07:21.949068+00:00)

## What it is
Truth is a fluent assertion library for Java and Android tests, maintained by the Guava team and used widely in Google's codebase. It provides readable assertThat-style assertions with detailed failure messages and native support for many JDK and Guava types.

## Use cases
- write readable assertions in Java unit tests
- get clearer failure messages than assertEquals
- assert on Guava collections like Multimap and Multiset
- test Java 8 types like Optional and Stream
- write custom subjects for domain-specific types
- use assertions in Android instrumentation tests

## When to choose
- you want fluent, chainable assertions with informative failure output
- your project already uses Guava types
- you prefer Truth's style over AssertJ or Hamcrest

## When to avoid
- you want to avoid extra test dependencies and stick with JUnit's built-in asserts
- your team is standardized on AssertJ or Hamcrest

## Facets
- artifact type: library
- maturity: stable
- function: testing
- domain: testing, developer-tools, mobile-development
- platform: jvm, cross-platform
- tags: fluent-assertions, unit-testing, assertion-framework, guava, junit, android

## Member repositories
- google/truth (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:21.949068+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-30T08:16:00.134139+00:00, confidence not recorded.
  - readme: https://github.com/google/truth (fetched 2026-08-28T04:07:21.949068+00:00, sha f07db9b6d79c)
  - homepage: https://truth.dev/ (fetched 2026-08-29T09:55:11.216315+00:00, sha b7d8d5b91126)
  - site_page: https://truth.dev/faq (fetched 2026-08-29T09:55:11.225369+00:00, sha 470ca415a1b5)
  - site_page: https://truth.dev/api (fetched 2026-08-29T09:55:11.227909+00:00, sha a72ea1e79474)
- Data as of 2026-08-30T08:39:29.467469+00:00.
