Community
Participate
Working Groups
I prefer to keep my jUnit tests in a separate directory structure which mirrors the source directory layout exactly. I also prefer to keep the name of the jUnit testcase the same as the class name which it is testing. I find this layout to be extremely intuitive and easy to maintain; since each test is kept outside the product itself, I can easily package up a product w/out having to include my tests. By keeping a separate classpath for the src and test directories (in fact, the test is identical to the src except that it includes itself) I can maintain this logical split but keep all the benefits of having the tests inside the same package as their counterparts but without cluttering up my real src directory as well as allowing for the src and test filename to be duplicated without filesystem collisions. Recent online discussion has validated that others also would prefer this hierarchy. Unfortunately, when both src and test directories are added into the classpath Eclipse correctly errors that the type [classname] is already defined. Thank you for a great product!
I should have added, that a minimal fix for this would also include the ability to configure what type of error/warn/ignore message should be posted into the Problem panel.