DEV Community

Luiz Gustavo Costa
Luiz Gustavo Costa

Posted on

1

How to start a JUnit 5 project in few minutes

In the next minutes you will able to create and run a project using JUnit 5

Table of minutes

Minute 1

Download the project archetype from my GitHub and follow the readme.md
If you have any doubt check the post how-to-create-a-maven-archetype-in-5-minutes-1

Minute 2

After have the archetype and create the project as the Minute 1 open the project using an IDE such as IntelliJ /Eclipse and let's analyze the first test in JUnit 5.

Minute 3

Check the dependencies for sure. The dependencies
junit-platform-commons, junit-jupiter-api, junit-jupiter-engine, junit-jupiter-params, mockito-junit-jupiter should be in place.
Dependencies

Minute 4

Let see the test class
Test class

Minute 5

Now is time to you create more tests and make your application more reliable.

Thank you by your time and shortly I'll make available one post more complete about JUnit 5.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay