DEV Community

Luiz Gustavo Costa
Luiz Gustavo Costa

Posted on

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.

Top comments (0)