1

I wonder is there any id or specified label to distinguish a selected class whether it is one of the standard class declarations or test class in run-time?

EDIT: I collect the entire classes from the project. I separate abstract classes, interfaces, subclasses by looking the collection, whereas I also want to know how many classes have test behavior. In other words, how many classes are actually test classes. One more thing: I don't know these classes in advance, these are not mine!

Hakan Özler
  • 968
  • 1
  • 10
  • 22

1 Answers1

2

Let me share with you how I like to organize my tests in eclipse :-) maybe you may find useful.

First, I create two projects, one for the app and another for the test.

enter image description here

The test project, of course, has a dependency on the app project

enter image description here

Now, let's suppose you want to add some test case, you just point to the right src dir.

enter image description here

So you want to create your test code without mixing app code and test code (for example, utils), just leave what's specific to the right project.

enter image description here

The only name convention I use is the eclipse junit default, appending the word "Test" in the end of the test class.

No need for ant scripts to deploy only the app code.

Even JUNIT dependency is restricted to the test project.

I hope it helps.

Leo
  • 6,480
  • 4
  • 37
  • 52