Menu

Showing posts with label Run test for a single file only. Show all posts
Showing posts with label Run test for a single file only. Show all posts

How to run unit test for a specific file using mvn command?

For a single class

 mvn clean test -Dtest=ClassNameTest

For a specific method within a class

 mvn clean test -Dtest=ClassNameTest#MethodName