Skip to content
Home » How to run a single test method with maven

How to run a single test method with maven

Let’s start the discussion about How to run a single test method with maven in following methods.

Run a single test method with maven

To Run a single test method with maven then follow the below command.

# Run all the unit test classes.
$ mvn test

# Run a single test class.
$ mvn -Dtest=TestApp1 test

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : How to store git credentials