We have several junit test cases in a particular file, how do I run a certain test alone.
Note: I am aware of the @Ignore annotation, but don’t want to use it. Since you will still have to mark the rest of the use cases with the @Ignore option.
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.
You can specify the test you would like to run via the
-Dtest=parameter.Just run it with this parameter values:
It is only supported in JUnit 4.x. More information: Running a single test