Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

junit-team/junit-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1,185 Commits

Repository files navigation

JUnit Examples

Welcome to JUnit Examples, a collection of example applications and extensions using JUnit Jupiter, JUnit Vintage, and the JUnit Platform on various build systems.

CI builds for example projects are performed by GitHub Actions. Using JDK 24+'s java multi-file source-code launcher feature, you may build all examples by running java src/Builder.java in the main directory of this project.

Jupiter Starter Examples

Basic setups showing how to get started with JUnit Jupiter.

Jupiter on Ant

The junit-jupiter-starter-ant example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using the Ant build system.

Jupiter on Gradle

The junit-jupiter-starter-gradle example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using the Gradle build system.

Jupiter on Gradle using Kotlin

The junit-jupiter-starter-gradle-kotlin example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using the Gradle build system and the Kotlin programming language.

Jupiter on Gradle using Groovy

The junit-jupiter-starter-gradle-groovy example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using the Gradle build system and the Groovy programming language.

Jupiter on Maven

The junit-jupiter-starter-maven example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using the Maven build system.

Jupiter on Maven using Kotlin

The junit-jupiter-starter-maven-kotlin example demonstrates the bare minimum configuration for getting started with JUnit Jupiter project using Maven build system and Kotlin programming language.

Jupiter on Bazel

The junit-jupiter-starter-bazel example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using the Bazel build system.

Jupiter on sbt

The junit-jupiter-starter-sbt example demonstrates the bare minimum configuration for getting started with JUnit Jupiter using sbt and the Scala programming language.

Jupiter Feature Examples

Extending JUnit Jupiter using its Extension API.

Sample Extensions

The junit-jupiter-extensions example demonstrates how one can implement custom JUnit Jupiter extensions and use them in tests.

Migration Examples

More complex setups how to integrate various parts of "JUnit 5" including a possible migration path for JUnit 3 or 4 based projects.

Gradle Migration

The junit-migration-gradle example demonstrates how to set up a Gradle project using the JUnit Platform, JUnit Jupiter, and JUnit Vintage.

Maven Migration

The junit-migration-maven example demonstrates how to set up a Maven project using the JUnit Platform, JUnit Jupiter, and JUnit Vintage.

Platform Samples

Showing basic features of the JUnit Platform.

Multiple Engines ...

The junit-multiple-engines example demonstrates how to set up a Gradle project using the JUnit Platform with various TestEngine implementations.

Living in the Modular World

The junit-modular-world example demonstrates how to test code organized in modules. This example also demonstrates how to implement a custom TestEngine for the JUnit Platform using the Java Platform Module System.

About

Collection of JUnit example projects

Resources

Readme

License

EPL-2.0 license

Code of conduct

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Contributors 34