Skip to content

Instantly share code, notes, and snippets.

View zhrfrd's full-sized avatar

Farid Zouheir zhrfrd

View GitHub Profile
@zhrfrd
zhrfrd / Java Testing with JUnit (Introduction).md
Last active February 16, 2025 14:39
Java Testing with JUnit (Introduction)

Java Testing with JUnit (Introduction)

This quick guide explains how to set up JUnit in IntelliJ and demonstrates its usage with few examples. Additionally, I've included the key resources I've used, and continue to use, to learn Java testing with JUnit.

1. Create a project

This quide summarize how to set up the project using Maven and Gradle build tool**:

  1. Go to File > New > Project or, if you are int eh IntelliJ Welcome page simply select New Project.
  2. Select Java from the list on the left of the New Project wizard.
  3. Name the project and select Maven or Gradle as a build system.
  4. Select the JDK you want to use for your project. (If no JDK version is listed make sure you download it).
  5. Select Create.