NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
justdanyul
Joined: 22 Nov 2008 Posts: 3
|
Posted: Sat Nov 22, 2008 6:43 pm Post subject: Ant question.. i think.. :D |
|
|
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 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
|
Posted: Sat Nov 22, 2008 7:33 pm Post subject: |
|
|
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?  |
|
| Back to top |
|
 |
|
|
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
|
|