Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
One thing in the presented directory structure that got my attention is that you've got production code ("<ROOT>/src") and test code ("<ROOT>/test") living in separate top-level directory trees. Personally, I prefer having them within a single directory tree like "<ROOT>/src/main" and "<ROOT>/src/test". While this does lengthen the overall file paths by 5 characters (shocking, isn't it...), it also tends to simplify any scripts that need to deal with source code--because you only need to specify one path, not two, in order to cover all your source code. Again, this is a rather minor thing and definitely a matter of personal preference.
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
Reid - SCJP2 (April 2002)
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Lasse Koskela:
I quickly reached a point where I had trouble getting a "visual" of what's in a package when there were 2-3 classes containing test stuff (test classes, mock implementations) per each production class.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Reid M. Pinchback:
Ant does just fine with file name patterns when I need to create clean functional vs test build products for release. While keeping the test stuff separate makes sense to me, having it not compile was more grief than any hypothetical issue associated with not having separate directories. When the files are in one directory hierarchy, bad practices of others have less impact on you.
Originally posted by Warren Dew:
You can ensure that your production code doesn't depend on your test code by having your integration tests run a target that compiles only the production code - easy to do, since the tests have to be identifiable to run them anyway.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |