# hamcrest/JavaHamcrest

Java (and original) version of Hamcrest

Repository: https://github.com/hamcrest/JavaHamcrest
Canonical: https://ross.abutalabs.com/products/javahamcrest
Homepage: http://hamcrest.org/
Language: Java
License: BSD-3-Clause
License Family: permissive
Last push: 2025-02-24T12:15:06+00:00

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

## Adoption (not part of the score)
Stars 2189, forks 384 (observed 2026-08-28T04:06:23.949740+00:00)

## What it is
JavaHamcrest is the original Java version of Hamcrest, a library of matcher objects that can be combined to create flexible, readable expressions of intent in tests. It is widely used with testing frameworks like JUnit and is available via Maven Central.

## Use cases
- write readable assertions in JUnit tests
- combine matchers into flexible test conditions
- assert on collections and object properties in Java tests
- create custom matchers for domain-specific assertions
- improve test failure messages with descriptive matchers

## When to choose
- you write Java/JVM tests and want expressive, composable assertions
- you need better failure messages than plain JUnit asserts
- you want a stable, well-established matcher library with Maven Central distribution

## When to avoid
- you prefer AssertJ-style fluent assertion chains
- you are not working on the JVM or a language with a Hamcrest port
- you need async or integration testing infrastructure rather than assertions

## Facets
- artifact type: library
- maturity: stable
- function: testing, developer-tools
- domain: testing, developer-tools
- platform: jvm
- tags: matchers, assertion-library, unit-testing, test-expressions, java

## Member repositories
- hamcrest/JavaHamcrest (main) score 26

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:23.949740+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-30T02:47:43.926872+00:00, confidence not recorded.
  - readme: https://github.com/hamcrest/JavaHamcrest (fetched 2026-08-28T04:06:23.949740+00:00, sha d8a8fdc96332)
  - homepage: http://hamcrest.org/ (fetched 2026-08-29T10:27:59.219368+00:00, sha f4b426c39a99)
- Data as of 2026-08-30T08:39:29.467469+00:00.
