Eclipse cannot find JUnit test case folder - how to set it up?

I want to test methods of Java classes using JUnit. So I use Eclipse and create a "TestCases" source folder that contains a package named "test" which should be the place where I want to put my JUnit test cases. The entire created directory is shown in the following figure:

enter image description here

My problem is when I right click on "test" and go to "JUnit Test Case" and write for example "ASTAnyExprTest" (see (1) in the next picture) and go to "Overview" (see . (2)) and enter "ASTAnyExpr" (see (3)) to set the name of the tested class, then I see only empty space (do not select a class).

enter image description here

So I must have a path problem, I thought. My first idea was to copy all the classes into the "test" package. But then I need to change and configure all the dependencies in the classes. So, is there a better solution for this?

Regards,

0


source to share





All Articles