How to run JUnit test with Maven

java-featured-image

This tutorial will cover how to run Unit tests using the Maven’s Surefire plugin. If you are not familiar with Unit Testing, you can follow this tutorial for a quick catch-up. In our Maven Project, we need the following mandatory dependencies: <dependencies>     <dependency>         <groupId>org.junit.jupiter</groupId>         <artifactId>junit-jupiter-api</artifactId>         <version>5.4.2</version>         <scope>test</scope>     </dependency>     <dependency>        <groupId>org.junit.jupiter</groupId>         <artifactId>junit-jupiter-engine</artifactId>         <version>5.4.2</version>         <scope>test</scope>     </dependency> </dependencies>…

Continue reading