Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

newbie: JUnit tests, best practice for the location of input test files?

Thread view: 
jsoftwaredev@gmail.com - 23 Oct 2007 16:06 GMT
If I am creating JUnit tests that have test input files, are there any
best practices for where input test files should go?

Right now I am placing them in the same Java package that the test
class resides in.
Manish Pandit - 23 Oct 2007 19:17 GMT
On Oct 23, 8:06 am, jsoftware...@gmail.com wrote:
> If I am creating JUnit tests that have test input files, are there any
> best practices for where input test files should go?
>
> Right now I am placing them in the same Java package that the test
> class resides in.

You could name the package to indicate that it contains test sources.
If the main comtree is com.xyz.services, the corresponding test
package could be something like com.xyz.services.test. I personally
prefer Maven, as it provides a placeholder for junits, as well as
ensures that the build process includes running junits (you can always
override this though!), and does not include test classes in the
release/target jars.

-cheers,
Manish


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.