NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Ant question.. i think.. :D

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
justdanyul



Joined: 22 Nov 2008
Posts: 3

PostPosted: Sat Nov 22, 2008 6:43 pm    Post subject: Ant question.. i think.. :D Reply with quote

I have recently given Jakarta Cactus a look for unit testing servlets (and various other classes which makes use of HttpServletRequest instances)

My problem right now? I dont speak Ant.. So, currently, i added a package called com.mycomp.myapp.unittesting and im writing the tests inthere and manually running them on the server though the ServletTestRunner servlet provided by the nice cactus people.

I dont want this Very Happy I want to segment my tests from my actual application, so basically i can create a .war which doesn't include the testcases.

Since netbeans provides the 'Test packages' segment, it would be great if it was possible for me to actually write the test cases in there(like you do with regular JUnit testcases). But, if i do that now, they will fail. Im guessing its because the test packages is set up for regular JUnit testcases and it have no idea what to do with the cactus derived servlet testcases.

So heres my question, is there anyway of defining custom build targets(im guessing this is done with ant, I just dont have the faintest clue how to go about this)? In a perfect word, I would end up with a "Build cactus tests" option which complied the project including the classes in "Test packages"? And additionally, would it be possible to generate a web.xml file for the war. basically adding the mapping which are only needed for the testing to the existing web.xml file
Back to top
justdanyul



Joined: 22 Nov 2008
Posts: 3

PostPosted: Sat Nov 22, 2008 7:33 pm    Post subject: Reply with quote

Right, I looked into the build-impl.xml file. A comment at the top of the file suggests this file is automatically generated, and that im intended to use the build.xml file instead.

I'm guessing if i implement a target in build.xml will it override the ones in build-impl.xml?

Im guessing that one of the things i need to override the "-do-test-run" target (and again, im guessing <webproject2:junit/> is actually runs the little JUnit frame/dialog in netbeans).

Is there anywhere i can read about how the Netbeans+Ant integration works? So i dont have to guess about these things? Very Happy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo