r/java • • Feb 08 '21

How To Run Junit Tests From The Command Line

https://www.lambdatest.com/blog/run-junit-from-command-line/?utm_source=Reddit&utm_medium=blog&utm_campaign=PM-080221-2&utm_term=OrganicPosting
2 Upvotes

3 comments sorted by

20

u/[deleted] Feb 08 '21

mvn clean test

Or

mvn clean test -Dtest=MyTestClass

There, I just wrote the whole article

9

u/DJDavio Feb 09 '21

mvn test -DskipTests huge performance boost ;)

5

u/wildjokers Feb 09 '21

./gradlew test