How do you run a JUnit test case in Maven?
Use the following command to run unit tests with Junit Maven: mvn clean test. While running this command directly on command prompt, our focus should be on ensuring that the Maven Surefire plugin would run the unit tests perfectly. It’s now possible to create any Maven project compiling and running unit tests that comes with JUnit 5.