# junit-team/junit4

A programmer-oriented testing framework for Java — :warning: maintenance mode

Repository: https://github.com/junit-team/junit4
Canonical: https://ross.abutalabs.com/products/junit4
Homepage: https://junit.org/junit4
Language: Java
License: EPL-1.0
License Family: copyleft
Last push: 2026-08-13T04:47:03+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 8, longevity 100
- inputs: {"age_days": 6441, "days_push": 20, "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 8515, forks 3261 (observed 2026-08-28T04:10:23.299543+00:00)

## What it is
JUnit 4 is a programmer-oriented unit testing framework for Java, following the xUnit architecture with annotations, assertions, and Hamcrest matchers. It is now in maintenance mode, receiving only critical bug and security fixes, with active development moved to the successor junit-framework repository.

## Use cases
- write unit tests for java code
- run repeatable tests with @Test annotations
- parameterized testing in java
- exception testing with expected failures
- legacy java project still on junit 4
- expressive assertions with hamcrest matchers

## When to choose
- maintaining or extending an existing Java codebase already using JUnit 4
- a legacy tool or build setup requires the JUnit 4 API
- you only need critical bug/security fixes on a stable test framework

## When to avoid
- starting a new Java project - use JUnit 5 (junit-framework) instead
- you need ongoing feature development, new runners, or modern extension points
- you want long-term community support and active issue triage

## Facets
- artifact type: framework
- maturity: maintenance
- function: testing
- domain: testing, developer-tools, programming-languages
- platform: jvm, cross-platform
- tags: unit-testing, xunit, java, test-runner, hamcrest, annotations, legacy

## Member repositories
- junit-team/junit4 (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.299543+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:26:41.194732+00:00, confidence not recorded.
  - readme: https://github.com/junit-team/junit4 (fetched 2026-08-28T04:10:23.299543+00:00, sha fb0ccdaf14aa)
  - homepage: https://junit.org/junit4 (fetched 2026-08-29T08:26:46.849501+00:00, sha 69e44faa1c9d)
  - site_page: https://junit.org/junit4/faq.html (fetched 2026-08-29T08:26:46.858899+00:00, sha 62dc9b719b7e)
  - site_page: https://junit.org/junit4/index.html (fetched 2026-08-29T08:26:46.862518+00:00, sha fbb39705ec02)
  - site_page: https://junit.org/junit4/javadoc/latest/index.html (fetched 2026-08-29T08:26:46.864407+00:00, sha b50cb4475c4d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
