JUnit

JUnit
DevelopersKent Beck, Erich Gamma, David Saff
Stable release
6.0.1 / October 31, 2025 (2025-10-31)
Written inJava
Operating systemCross-platform
TypeUnit testing tool
LicenseEclipse Public License 2.0 (relicensed previously)
Websitejunit.org
Repository

JUnit is a test automation framework for the Java programming language. JUnit is often used for unit testing, and is one of the xUnit frameworks.

JUnit is linked as a JAR at compile-time. The latest version of the framework, JUnit 6, resides under package org.junit.jupiter. Previous versions JUnit 4 and JUnit 3 were under packages org.junit and junit.framework, respectively.

A research survey performed in 2013 across 10,000 Java projects hosted on GitHub found that JUnit (in a tie with slf4j-api) was the most commonly included external library. Each library was used by 30.7% of projects.