DevOps / Maven Surefire Plugin Interview Questions
How do you run a single test class from the command line?
Use the -Dtest property with the class name:
mvn test -Dtest=UserServiceTest
You can target a single method the same way, using a # separator: mvn test -Dtest=UserServiceTest#shouldCreateUser.
More Related questions...