JUnit

junit : junit

JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.

Feb 13, 2021
63k usages
8.2k stars

Add dependency in Maven / Gradle

<!-- https://jmaven.com/dependency/junit/junit --> 
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.13.2</version>
</dependency>

1. Add dependency to a Maven project

Maven: Add the junit:junit library to the dependencies element of your pom.xml file:

<dependencies>
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.13.2</version>
</dependency>
</dependencies>

To install junit:junit library use the following command:

mvn install

2. Add dependency to a Gradle project

Gradle Groovy DSL: Add the junit:junit library to the dependencies section of your build.gradle file:

dependencies {
implementation 'junit:junit:4.13.2'
}

Gradle Kotlin DSL: Add the junit:junit library to the dependencies section of your build.gradle.kts file:

dependencies {
implementation("junit:junit:4.13.2")
}

3. Add dependency to a SBT Scala project

Scala: Add the junit:junit library to your build.sbt file:

libraryDependencies += "junit" % "junit" % "4.13.2"

4. Add dependency to a Grape project

Grape: Add an annotation junit:junit library to your groovy script file:

@Grapes(
    @Grab('junit:junit:4.13.2')
)

Compile Dependencies (0)

Group / Artifact Usage

Provided Dependencies (0)

Group / Artifact Usage

Test Dependencies (1)

Group / Artifact Usage
org.hamcrest » hamcrest-library 2.8k

Recommended for You

More from Group

JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.

63k usages
8.2k stars

JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java.

272 usages
© 2022 JMaven.com