Is there a simple way of creating stubs for Junit4 tests in Eclipse (Galileo)?
Share
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.
In the Package Explorer view, right-click on the file that you would like to create a JUnit test for. In the opened context menu, select New -> Other… . In the Select a wizard dialog, select Java -> JUnit -> JUnit Test Case .
Then a dialog opens. In case you have a default Maven or Gradle project, you will probably have to change the default Source folder from the provided
${PROJECT_NAME}/src/main/javato${PROJECT_NAME}/src/test/java. If you click Next, the dialog allows you to check which methods to automatically create stubs for.