[jboss-user] [EJB/JBoss] - Re: Unit Testing Practices

gommo do-not-reply at jboss.com
Wed Dec 20 22:39:41 EST 2006


I'm running TestNG using eclipse BUT from an ant file. Not using the eclipse plugin. I wanted it to work outside of eclipse as I also use Netbeans. (Thats a side issue but I wish Netbeans and Eclipse joined or something, eclipse is fast, I love its autobuilding etc.., but its project settings SUCK. You can't just checkout and build, you need to screw with launch files and they depend on your workspace name etc.. etc.. Very very poor) heheheh, anyway had to get that off my chest.

This is a condensed version of my structure

src\
build\
build-tests\
tests\
tests\src\
tests\lib\
tests\META-INF\
tests\conf
lib\

My main source is in src and my tests are in tests\src

When my test targets are run the source is compiled in build\ and also most classes are also copied to build-tests (The reason I have done this is the embedded server didn't support all things like ServiceBeans etc..) so I dont copy them over

tests\lib contains all the jars that come with the embedded download as well as testng jar

tests\META-INF\ contains my persistence.xml which is the same as the example I think that comes with the embedded download

tests\conf contains the conf files that come with the embedded download

The tricky part I had was ensuring that ONLY these paths are on the classpath
build-tests 
tests/src
tests/
tests/conf
tests/lib
lib

Hope that helps in some small way



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995497#3995497

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995497



More information about the jboss-user mailing list