JUnit

JUnit
Developer(s)Kent Beck, Erich Gamma, David Saff, Kris Vasudevan
Stable release
5.10.0 / July 23, 2023; 16 months ago (2023-07-23)[1]
Repository
Written inJava
Operating systemCross-platform
TypeUnit testing tool
LicenseEclipse Public License 2.0[2] (relicensed previously)
Websitejunit.org

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 5, resides under package org.junit.jupiter.[3] Previous versions JUnit 4[3] 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.[4]

  1. ^ "JUnit Releases". github.com. Retrieved 2023-07-23.
  2. ^ "Change license to EPL v2.0". github.com. 7 September 2017. Retrieved 2021-02-04.
  3. ^ a b Gulati & Sharma 2017, p. 144, §Chapter 8 Dynamic Tests and Migration from Junit 4.
  4. ^ "We Analyzed 30,000 GitHub Projects – Here Are The Top 100 Libraries in Java, JS and Ruby". Archived from the original on 2014-07-09. Retrieved 2014-02-09.