Using JUnit-Tools 1.1.0 to generate automatic test cases gives me "select a test-project"

Viewed 5007

I installed JUnit-Tools 1.1.0 in eclipse market. As per the documentation, they want the test-projects and the mock-projects to be created manually.

My class structure is like below : enter image description here

I tried creating a test package like com.unifiedportal.core.unifiedportal.service.test and tried generating the test classes from the JUnit-Tools..

Got an warning like below : enter image description here

Let me know how i should proceed with creating the test-project for this.

2 Answers

If you want to generate the tests under the same project you are in then remove Test-project-postfix in the junit tools preferences, otherwise let the postfix as it is and create a project (not a package) with the same name than your project plus that postfix.

Look an example of my config for generating the tests in the same project under src/test/java, because I don't want my tests to be in a separated project:

enter image description here

you can add the jars as maven or gradle dependencies.Change the test-source-folder-name to src/test/java and generate the test cases using the plugin.This will generate the test cases in your test folder

Related