I know you can run all the tests in a certain class using:
mvn test -Dtest=classname
But I want to run an individual method and -Dtest=classname.methodname doesn’t seem to work.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To run a single test method in Maven, you need to provide the command as:
where
TestCircleis the test class name andxyzis the test method.Wild card characters also work; both in the method name and class name.
If you’re testing in a multi-module project, specify the module that the test is in with
-pl <module-name>.For integration tests use
it.test=...option instead oftest=...: