RE: cactus ant task on existing container ?
Thanks Matt. Before I implement it I think I should ask: is it something very useful for you? Is that a feature you would really like? I'm asking because I don't have much time now and I'd only like to do it if it's really useful to someone... :-) I mean people can use server.xml for now. You also mentioned moving to Resin I think, so I'm not sure anymore whether you need it at all... :-) Thanks -Vincent -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: 14 January 2004 22:45 To: 'Cactus Users List' Subject: RE: cactus ant task on existing container ? Not long ago, I worked on supporting Resin 3.x but I had a question which never got answered on the resin mailing list (see attached). Would you know the answer by any chance? :-) Nope, I don't know much about Resin. ok thanks. That should be easy to support. Is this feature also supported in Tomcat 3.x and 5.x? It's not supported in 4.1 and in 4.x it looks in the $CATALINA_HOME/conf/Catalina/localhost/ by default, rather than the webapps directory. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting Websphere server from Ant script
-Original Message- From: PUTHENVILA P Johnson [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 20:44 To: 'Cactus Users List' Subject: Starting Websphere server from Ant script Hi All, I am doing unit testing using Cactus. I would like to know can I start Websphere application server using Ant script just like we start Tomcat, With Ant script you can do whatever you like. But maybe you meant with the cactus task? If that's the question then the answer is no. Currently the cactus task does not *directly* supports WebSphere. However, you can still use it for starting websphere using the generic nested tag. See the doc on the cactus web site. Thanks -Vincent for that which classes shouls I need? I would like to do automated testing using not through WSAD. Thanks Johnson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using cactus with junit tests and ant on existing and running container.
Hi Erez, -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 13:36 To: [EMAIL PROTECTED] Cc: 'Erez Nahir' Subject: Using cactus with junit tests and ant on existing and running container. Hi, On our project we have a running tomcat3.x that is used by our project as well as others. My requirement it to be able to run junit test cases (which I run now with ant and junit) inside tomcat's VM. Can someone please share info how should I create the ant file to do such thing (I got the impression I can do it with Cactus). Good impression! Have you had a look at the web site? http://jakarta.apache.org/cactus/integration/ant/index.html In my web.xml file I added: servlet servlet-nameCactusServletTestRunner/servlet-name servlet-classorg.apache.cactus.server.runner.ServletTestRunner/servle t- cl ass /servlet servlet-mapping servlet-nameCactusServletTestRunner/servlet-name url-pattern/CactusServletTestRunner/url-pattern /servlet-mapping Forget this. It's not needed if you use the cactus task. In addition, it's not correct :-) I also tried with runservertests calling junit task in the test target and with cactus task too. The problem is I don't have project.war file, I already got all the project directories and files extracted into tomcat's directory (which is not the default). Thanks, Erez. -Vincent PS: Please do subscribe to the mailing list. I've moderated your message this time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using cactus with junit tests and ant on existing and running container.
Hi Vincent, Yes I did go over all documents and mails, but when I'm running my tests I get some NoClassDefFoundError exceptions which shouldn't occur. This leads me to the thought that the tests are not actually running in Tomcat's VM but in the VM of ant. Here is some parts of my build.xml (its still pretty messy cause it's a work in progress :-(. taskdef resource=cactus.tasks classpathref=cactus.classpath/ target name=test description=Run JUnit test cases of Athena componenst runservertests testurl=http://enahir-w2k:1751/athena/CactusServletTestRunner?suite=com.cis co.nm.vms.common.AthenaTest starttarget=start.tomcat stoptarget=stop.tomcat testtarget=testme/ /target target name=start.tomcat /target target name=stop.tomcat /target target name=testme mkdir dir=${test.output}/ junit printsummary=${junit.summary} haltonfailure=${junit.halt.onfailure} haltonerror=${junit.halt.onerror} filtertrace=${junit.filtertrace} fork=${junit.fork} classpath path refid=project.classpath/ pathelement location=${aspectjrt.jar}/ pathelement location=${cactus.jar}/ pathelement location=${cactus.ant.jar}/ pathelement location=${commons.httpclient.jar}/ pathelement location=${commons.logging.jar}/ pathelement location=${junit.jar}/ /classpath formatter type=xml/ batchtest fork=${junit.fork} todir=${test.output} fileset dir=${athena.root.dir}/WEB-INF/classes include name=**/*Test*/ !-- helper classes, not testcases -- exclude name=**/*Util*/ exclude name=**/*Factory*/ exclude name=**/*Base*/ /fileset /batchtest /junit /target I guess I'm missing something. Thanks, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 2:50 PM To: 'Cactus Users List' Cc: [EMAIL PROTECTED] Subject: RE: Using cactus with junit tests and ant on existing and running container. Hi Erez, -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 13:36 To: [EMAIL PROTECTED] Cc: 'Erez Nahir' Subject: Using cactus with junit tests and ant on existing and running container. Hi, On our project we have a running tomcat3.x that is used by our project as well as others. My requirement it to be able to run junit test cases (which I run now with ant and junit) inside tomcat's VM. Can someone please share info how should I create the ant file to do such thing (I got the impression I can do it with Cactus). Good impression! Have you had a look at the web site? http://jakarta.apache.org/cactus/integration/ant/index.html In my web.xml file I added: servlet servlet-nameCactusServletTestRunner/servlet-name servlet-classorg.apache.cactus.server.runner.ServletTestRunn er/servle t- cl ass /servlet servlet-mapping servlet-nameCactusServletTestRunner/servlet-name url-pattern/CactusServletTestRunner/url-pattern /servlet-mapping Forget this. It's not needed if you use the cactus task. In addition, it's not correct :-) I also tried with runservertests calling junit task in the test target and with cactus task too. The problem is I don't have project.war file, I already got all the project directories and files extracted into tomcat's directory (which is not the default). Thanks, Erez. -Vincent PS: Please do subscribe to the mailing list. I've moderated your message this time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cactus ant task on existing container ?
Before I implement it I think I should ask: is it something very useful for you? Is that a feature you would really like? I'm asking because I don't have much time now and I'd only like to do it if it's really useful to someone... :-) I mean people can use server.xml for now. You also mentioned moving to Resin I think, so I'm not sure anymore whether you need it at all... :-) Vincent, I don't plan on moving to Resin, I merely want to test my apps on Resin (and other containers). Right now, my build.xml script for AppFuse (http://raibledesigns.com/appfuse) is very Tomcat-specific. I'm not sure I want to eliminate that dependency since it's very easy to get Tomcat installed and running quickly. I would, however, like to test my app on other containers. Using the cactus task seemed like the best way (though I dislike all the logging when Tomcat starts - doesn't happen with runservertasks). I think adding the feature would be useful and easier to work with - especially since most folks don't know about the webapps/context.xml, and once they do, they never touch server.xml again. At the same time, I could easily use the generic server implementation and re-use my existing stuff, since I don't plan on eliminating it anyway. So, I'd say - spend your time on things you enjoy more, not some silly little enhancement like this. ;-) I am going to send an e-mail to the Resin team to see if they'll consider adding similar functionality to Resin (i.e. looking in webapps for *.conf files). Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using cactus with junit tests and ant on existing and running container.
-Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 14:01 To: 'Vincent Massol'; 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. Hi Vincent, Yes I did go over all documents and mails, but when I'm running my tests I get some NoClassDefFoundError exceptions which shouldn't occur. This leads me to the thought that the tests are not actually running in Tomcat's VM but in the VM of ant. Here is some parts of my build.xml (its still pretty messy cause it's a work in progress :-(. taskdef resource=cactus.tasks classpathref=cactus.classpath/ target name=test description=Run JUnit test cases of Athena componenst runservertests testurl=http://enahir- w2k:1751/athena/CactusServletTestRunner?suite=com.cis co.nm.vms.common.AthenaTest starttarget=start.tomcat stoptarget=stop.tomcat testtarget=testme/ /target target name=start.tomcat /target target name=stop.tomcat /target target name=testme mkdir dir=${test.output}/ junit printsummary=${junit.summary} haltonfailure=${junit.halt.onfailure} haltonerror=${junit.halt.onerror} filtertrace=${junit.filtertrace} fork=${junit.fork} classpath path refid=project.classpath/ pathelement location=${aspectjrt.jar}/ pathelement location=${cactus.jar}/ pathelement location=${cactus.ant.jar}/ pathelement location=${commons.httpclient.jar}/ pathelement location=${commons.logging.jar}/ pathelement location=${junit.jar}/ /classpath formatter type=xml/ batchtest fork=${junit.fork} todir=${test.output} fileset dir=${athena.root.dir}/WEB-INF/classes include name=**/*Test*/ !-- helper classes, not testcases -- exclude name=**/*Util*/ exclude name=**/*Factory*/ exclude name=**/*Base*/ /fileset /batchtest /junit /target I guess I'm missing something. Yes, you are! Please read my email and the link I gave you :-) Thanks -Vincent Thanks, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 2:50 PM To: 'Cactus Users List' Cc: [EMAIL PROTECTED] Subject: RE: Using cactus with junit tests and ant on existing and running container. Hi Erez, -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 13:36 To: [EMAIL PROTECTED] Cc: 'Erez Nahir' Subject: Using cactus with junit tests and ant on existing and running container. Hi, On our project we have a running tomcat3.x that is used by our project as well as others. My requirement it to be able to run junit test cases (which I run now with ant and junit) inside tomcat's VM. Can someone please share info how should I create the ant file to do such thing (I got the impression I can do it with Cactus). Good impression! Have you had a look at the web site? http://jakarta.apache.org/cactus/integration/ant/index.html In my web.xml file I added: servlet servlet-nameCactusServletTestRunner/servlet-name servlet-classorg.apache.cactus.server.runner.ServletTestRunn er/servle t- cl ass /servlet servlet-mapping servlet-nameCactusServletTestRunner/servlet-name url-pattern/CactusServletTestRunner/url-pattern /servlet-mapping Forget this. It's not needed if you use the cactus task. In addition, it's not correct :-) I also tried with runservertests calling junit task in the test target and with cactus task too. The problem is I don't have project.war file, I already got all the project directories and files extracted into tomcat's directory (which is not the default). Thanks, Erez. -Vincent PS: Please do subscribe to the mailing list. I've moderated your message this time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using cactus with junit tests and ant on existing and running container.
Well, have gone again over the link and emails, added some jars to the build.xml. Now I can run the tests but I'm still thinking it's not in tomcat's VM but on my VM (the one ant forks via the junit). In addition, some other details: 1. Not all the jars used by my application are under the project's context, some under tomcat's lib (so I added them to the build.xml file). 2. Tomcat is running as NT Service. If you can give me a hint it will be great, cause I don't see were is my mistake. Thanks again, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 3:13 PM To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 14:01 To: 'Vincent Massol'; 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. Hi Vincent, Yes I did go over all documents and mails, but when I'm running my tests I get some NoClassDefFoundError exceptions which shouldn't occur. This leads me to the thought that the tests are not actually running in Tomcat's VM but in the VM of ant. Here is some parts of my build.xml (its still pretty messy cause it's a work in progress :-(. taskdef resource=cactus.tasks classpathref=cactus.classpath/ target name=test description=Run JUnit test cases of Athena componenst runservertests testurl=http://enahir- w2k:1751/athena/CactusServletTestRunner?suite=com.cis co.nm.vms.common.AthenaTest starttarget=start.tomcat stoptarget=stop.tomcat testtarget=testme/ /target target name=start.tomcat /target target name=stop.tomcat /target target name=testme mkdir dir=${test.output}/ junit printsummary=${junit.summary} haltonfailure=${junit.halt.onfailure} haltonerror=${junit.halt.onerror} filtertrace=${junit.filtertrace} fork=${junit.fork} classpath path refid=project.classpath/ pathelement location=${aspectjrt.jar}/ pathelement location=${cactus.jar}/ pathelement location=${cactus.ant.jar}/ pathelement location=${commons.httpclient.jar}/ pathelement location=${commons.logging.jar}/ pathelement location=${junit.jar}/ /classpath formatter type=xml/ batchtest fork=${junit.fork} todir=${test.output} fileset dir=${athena.root.dir}/WEB-INF/classes include name=**/*Test*/ !-- helper classes, not testcases -- exclude name=**/*Util*/ exclude name=**/*Factory*/ exclude name=**/*Base*/ /fileset /batchtest /junit /target I guess I'm missing something. Yes, you are! Please read my email and the link I gave you :-) Thanks -Vincent Thanks, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 2:50 PM To: 'Cactus Users List' Cc: [EMAIL PROTECTED] Subject: RE: Using cactus with junit tests and ant on existing and running container. Hi Erez, -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 13:36 To: [EMAIL PROTECTED] Cc: 'Erez Nahir' Subject: Using cactus with junit tests and ant on existing and running container. Hi, On our project we have a running tomcat3.x that is used by our project as well as others. My requirement it to be able to run junit test cases (which I run now with ant and junit) inside tomcat's VM. Can someone please share info how should I create the ant file to do such thing (I got the impression I can do it with Cactus). Good impression! Have you had a look at the web site? http://jakarta.apache.org/cactus/integration/ant/index.html In my web.xml file I added: servlet servlet-nameCactusServletTestRunner/servlet-name servlet-classorg.apache.cactus.server.runner.ServletTestRunn er/servle t- cl ass /servlet servlet-mapping servlet-nameCactusServletTestRunner/servlet-name url-pattern/CactusServletTestRunner/url-pattern /servlet-mapping Forget this. It's not needed if you use the cactus task. In addition, it's not correct :-) I also tried with runservertests calling junit task in the test target and with cactus task too. The problem is I don't have project.war file, I already got all the project directories and files
Re: Starting Websphere server from Ant script
Yes, I'm running Cactus tests on WAS using Ant. You can start WAS using the cactus Ant task. You'll have to do it the generic way. See the Ant Integration section on the Cactus web site for more details. One note. I couldn't get the WAS Ant tasks for starting/stopping the server to work, so I actually call the WAS start/stop scripts from my Ant script. Good luck! Sam PUTHENVILA P Johnson [EMAIL PROTECTED] wrote: Hi All, I am doing unit testing using Cactus. I would like to know can I start Websphere application server using Ant script just like we start Tomcat, for that which classes shouls I need? I would like to do automated testing using not through WSAD. Thanks Johnson - Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
RE: Using cactus with junit tests and ant on existing and running container.
-Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 16:36 To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. I don't use cactus because I don't have war file (or ear file) so I can't have this property in the task. When I start the tests, the application is already installed and it has directory structure extracted, it look like: TOMCAT_HOME\vms\athena (which is the context root) Under athena I have: WEB-INF (with lib, classes, util and other directories). Also under athena I have more directories used by my application. Oh ok. I thought you wanted to automate the whole process. Any reason you don't want? The not-so-nice-thing with your setup/approach is that you're going to be polluting your runtime application with Cactus-specific stuff (jars in lib/, extra config in web.xml, etc). Is it possible to use cactus without war and without cactifywar called before? Docs says: no. no :-) Simply use the junit task as you've done. Now, if you would like us to help you, youneed to show us what your problem is. You just mention in your email that you get a NCDFE. Can you show the stack trace? Thanks -Vincent Thanks, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:59 PM To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 14:54 To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. Well, have gone again over the link and emails, added some jars to the build.xml. Now I can run the tests but I'm still thinking it's not in tomcat's VM but on my VM (the one ant forks via the junit). In addition, some other details: 1. Not all the jars used by my application are under the project's context, some under tomcat's lib (so I added them to the build.xml file). 2. Tomcat is running as NT Service. If you can give me a hint it will be great, cause I don't see were is my mistake. Are you using the cactus task as mentioned in my email? It's described at the link I gave you. [snip] Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using cactus with junit tests and ant on existing and running container.
Oh ok. I thought you wanted to automate the whole process. Any reason you don't want? The not-so-nice-thing with your setup/approach is that you're going to be polluting your runtime application with Cactus-specific stuff (jars in lib/, extra config in web.xml, etc). I do want very much but it's a very complicated project developed over 6 remote sites and its 3rd release so we cant get it all in one, for now I can only try to automate the test itself :-(. Simply use the junit task as you've done. But than it doesn't started in the Tomcat VM but in my VM isn't it? Now, if you would like us to help you, youneed to show us what your problem is. You just mention in your email that you get a NCDFE. Can you show the stack trace? Sure, but that's not the real problem, this one I solve by adding the required jars to my project's build classpath, so I did and it solved the problem. I have another tool someone in my team wrote, that is calling the CactusServletTestRunner with every testcase, but this in not acceptable cause each one need to go over all the links (we have more than 50). What I want is to be able to call all my test cases from ant file (or even with a single URL) and Cactus to invoke all the tests on tomcat's VM. The NCDFE is really not relevant here IMHO. The process as it is done today is as follows: 1. Build generate the project image; 2. Build generate project-test image; 3. Developers install the project. 4. Developers install the project-test (now all the Cactus specific stuff is added but we can live with it because we run also external tests on project image without project-test install); 5. Developers open a browser and use index.html with the links. 6. Upon clicking on specific link, the relevant test case is started and generate the known junit report (but only for this test). Now, what I'm looking for is to improve steps number 5 and 6 (in addition I can add stuff to step 4), such that I'll be able to run either a single url call that will generate the xmls (and than I'll generate the report with junitreport ant's task), or do ant call with cactus to run all the test cases as if they are on the real VM. Any suggestions how to do it? Thanks, Erez. Thanks -Vincent Thanks, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:59 PM To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 14:54 To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. Well, have gone again over the link and emails, added some jars to the build.xml. Now I can run the tests but I'm still thinking it's not in tomcat's VM but on my VM (the one ant forks via the junit). In addition, some other details: 1. Not all the jars used by my application are under the project's context, some under tomcat's lib (so I added them to the build.xml file). 2. Tomcat is running as NT Service. If you can give me a hint it will be great, cause I don't see were is my mistake. Are you using the cactus task as mentioned in my email? It's described at the link I gave you. [snip] Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using cactus with junit tests and ant on existing and running container.
Sorry Erez, but I'm a bit rushed by the time and you keep changing the subject/questions in your emails (at least that's my perception) and I don't understand what your problem is. I don't know what your question is at this point? I've also suggested several solutions (including using junit directly as you seem to have done - this is at least the script you were showing before). I'll let others chime in for now. Thanks -Vincent -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 17:06 To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. Oh ok. I thought you wanted to automate the whole process. Any reason you don't want? The not-so-nice-thing with your setup/approach is that you're going to be polluting your runtime application with Cactus-specific stuff (jars in lib/, extra config in web.xml, etc). I do want very much but it's a very complicated project developed over 6 remote sites and its 3rd release so we cant get it all in one, for now I can only try to automate the test itself :-(. Simply use the junit task as you've done. But than it doesn't started in the Tomcat VM but in my VM isn't it? Now, if you would like us to help you, youneed to show us what your problem is. You just mention in your email that you get a NCDFE. Can you show the stack trace? Sure, but that's not the real problem, this one I solve by adding the required jars to my project's build classpath, so I did and it solved the problem. I have another tool someone in my team wrote, that is calling the CactusServletTestRunner with every testcase, but this in not acceptable cause each one need to go over all the links (we have more than 50). What I want is to be able to call all my test cases from ant file (or even with a single URL) and Cactus to invoke all the tests on tomcat's VM. The NCDFE is really not relevant here IMHO. The process as it is done today is as follows: 1. Build generate the project image; 2. Build generate project-test image; 3. Developers install the project. 4. Developers install the project-test (now all the Cactus specific stuff is added but we can live with it because we run also external tests on project image without project-test install); 5. Developers open a browser and use index.html with the links. 6. Upon clicking on specific link, the relevant test case is started and generate the known junit report (but only for this test). Now, what I'm looking for is to improve steps number 5 and 6 (in addition I can add stuff to step 4), such that I'll be able to run either a single url call that will generate the xmls (and than I'll generate the report with junitreport ant's task), or do ant call with cactus to run all the test cases as if they are on the real VM. Any suggestions how to do it? Thanks, Erez. Thanks -Vincent Thanks, Erez. -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 4:59 PM To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. -Original Message- From: Erez Nahir [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 14:54 To: 'Cactus Users List' Subject: RE: Using cactus with junit tests and ant on existing and running container. Well, have gone again over the link and emails, added some jars to the build.xml. Now I can run the tests but I'm still thinking it's not in tomcat's VM but on my VM (the one ant forks via the junit). In addition, some other details: 1. Not all the jars used by my application are under the project's context, some under tomcat's lib (so I added them to the build.xml file). 2. Tomcat is running as NT Service. If you can give me a hint it will be great, cause I don't see were is my mistake. Are you using the cactus task as mentioned in my email? It's described at the link I gave you. [snip] Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cactus ant task on existing container ?
-Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: 14 January 2004 22:45 To: 'Cactus Users List' Subject: RE: cactus ant task on existing container ? Not long ago, I worked on supporting Resin 3.x but I had a question which never got answered on the resin mailing list (see attached). Would you know the answer by any chance? :-) Nope, I don't know much about Resin. ok thanks. That should be easy to support. Is this feature also supported in Tomcat 3.x and 5.x? It's not supported in 4.1 and in 4.x it looks in the $CATALINA_HOME/conf/Catalina/localhost/ by default, rather than the webapps directory. I have tomcat-4.1.29 on my machine and it seems there are 2 context files in the webapps directory (admin.xml and manager.xml). When you mentioned 4.x above, did you actually mean 4.0.x? Thanks -Vincent Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cactus ant task on existing container ?
On Jan 15, 2004, at 9:26 AM, Vincent Massol wrote: It's not supported in 4.1 and in 4.x it looks in the $CATALINA_HOME/conf/Catalina/localhost/ by default, rather than the webapps directory. I have tomcat-4.1.29 on my machine and it seems there are 2 context files in the webapps directory (admin.xml and manager.xml). When you mentioned 4.x above, did you actually mean 4.0.x? It's only supported in 4.1.x and above. I tried it in 4.0.6 a few weeks back and it failed. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cactus ant task on existing container ?
-Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 14:06 To: 'Cactus Users List' Subject: RE: cactus ant task on existing container ? Before I implement it I think I should ask: is it something very useful for you? Is that a feature you would really like? I'm asking because I don't have much time now and I'd only like to do it if it's really useful to someone... :-) I mean people can use server.xml for now. You also mentioned moving to Resin I think, so I'm not sure anymore whether you need it at all... :-) Vincent, I don't plan on moving to Resin, I merely want to test my apps on Resin (and other containers). Right now, my build.xml script for AppFuse (http://raibledesigns.com/appfuse) is very Tomcat-specific. I'm not sure I want to eliminate that dependency since it's very easy to get Tomcat installed and running quickly. I would, however, like to test my app on other containers. Using the cactus task seemed like the best way (though I dislike all the logging when Tomcat starts - doesn't happen with runservertasks). Huh? What logging? I don't get any at all. Are you sure you're using the output attribute? (see http://jakarta.apache.org/cactus/integration/ant/task_cactus.html). I think adding the feature would be useful and easier to work with - especially since most folks don't know about the webapps/context.xml, and once they do, they never touch server.xml again. Shhushh... don't tell them... ;-) At the same time, I could easily use the generic server implementation and re-use my existing stuff, since I don't plan on eliminating it anyway. So, I'd say - spend your time on things you enjoy more, not some silly little enhancement like this. ;-) ok. I've implemented and committed it. I'm currently running a full build now which I'll upload in the nightly build area. It would be cool if you could test it though... :-) I am going to send an e-mail to the Resin team to see if they'll consider adding similar functionality to Resin (i.e. looking in webapps for *.conf files). Ok. Cool Thanks -Vincent Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML output encoding
Hi, I just wanted to know how do I change the default encoding to ISO-8859-1. I'm having trouble displaying output with spanish accents. Thanks. _ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.latam.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XML output encoding
Hi Alexander, Can you be more specific and explain where do you see this problem? Thanks -Vincent -Original Message- From: Alexander Cárdenas Benedetti [mailto:[EMAIL PROTECTED] Sent: 15 January 2004 20:45 To: [EMAIL PROTECTED] Subject: XML output encoding Hi, I just wanted to know how do I change the default encoding to ISO-8859-1. I'm having trouble displaying output with spanish accents. Thanks. _ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.latam.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FormAuthentication with machine name
Hi Anton, Sorry for the late answer. The status is in the bug itself: http://issues.apache.org/bugzilla/show_bug.cgi?id=17933 It's still open and thus has not been fixed. Would you have patch for it? Thanks -Vincent -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 08 January 2004 11:11 To: Cactus Users List Subject: FormAuthentication with machine name I already asked this question five months ago and did not get any answer ... There was/is a Bug (17933) with FormAuthentication using not localhost as the machine name in the cactus.properties file (cactus.contextURL). The fix was announced earlier for version 1.6. Is this already fixed in one of the nightly builds? I already tried two or three of the earlier ones but without success. Thanks for any help! Toni Grimm --- Anton Grimm MAN Nutzfahrzeuge AG IDP - Software Produktionsumgebungen Dachauerstr.667 D - 80995 München Fon: +49-89-1580-1054 Fax: +49-89-1580-911054 mailto:[EMAIL PROTECTED] Internet: http://www.man-trucks.com --- Vincent Massol [EMAIL PROTECTED]An: 'Cactus Users List' [EMAIL PROTECTED] com Kopie: Thema:RE: Login once using (FormAuthentication) for all tests in a class 04/01/08 09:55 AM Bitte antworten an Cactus Users List Hi Matt, -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: 08 January 2004 01:21 To: Cactus Users List Subject: Login once using (FormAuthentication) for all tests in a class Quick and dirty question: Is it possible to login once (using FormAuthentication) for a class, rather than adding a beginXXTestName befor every testXXTestName method? hmm... There is a global begin(WebRequest) method. But it is called before every test (it's the equivalent of setUp() but on the client side). What we should do really is create the equivalent of JUnit TestSetup but with methods names begin/end instead of SetUp/tearDown. Patches much welcome :-) Longer explanation: I have a number of tests in my ContactActionTest - this test extends CactusStrutsTestCase, which extends ServletTestCase - nothing is really Struts specific in this scenario. In order to simulate logging in, I've simply retrieved a user object in by setUp() method and stuffed it into the session - this seems to simulate a login good enough. However, today, I started logging down my Actions/Servlets with roles. So now this doesn't work - do I have to have a beginXX before each testXX that logs the user in (with FormAuthentication)? Thinking more about it, I'm not so sure that the solution is a method that is called only once... Each test must set its own fixture. So you should group test using the same fixture (i.e. user being logging in) in the same TestCase class. Then simply use either begin() or even better setUp() (it has direct access to the session) to log the user in before *each* test. Cactus is about unitary tests so each test must set its own fixture and not depend on other tests or side effects. Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XML output encoding
Ok, I'm going to try to be more specific. I have a regular class named test.com.xyz.model.web.FiltroCronologicoBeanTest that extends from ServletTestCase, and I have several test methods, some of which have assert or fail messages that contain spanish accented characters. i.e. fail(No se lanzó la excepción \EJBException\); (Notice the accented o). If the test reaches the fail line it would have to display that message on the output XML that is displayed when you access the URL: http://localhost:8080/myProject/ServletTestRunner?suite=test.com.xyz.model.web.FiltroCronologicoBeanTest. Since the encoding is not the appropiate IE will display an error telling that it can't display de XML page because it encountered an invalid character. This display problem can't be corrected if I use XSL, although I can manage to change the output encoding AFTER processing the XML with the XSL, but the XML keeps coming with an encoding that doesn't support the characters that I'm trying to display. The same problem happens if you have an exception thrown by some method that you're testing that contains a non UTF-8 character. In summary: all I want to do is to switch some property that let me change the output XML encoding from UTF (or whatever it is) to ISO-8859-1. Thank you. From: Vincent Massol [EMAIL PROTECTED] Reply-To: Cactus Users List [EMAIL PROTECTED] To: 'Cactus Users List' [EMAIL PROTECTED] Subject: RE: XML output encoding Date: Thu, 15 Jan 2004 21:00:14 +0100 Hi Alexander, Can you be more specific and explain where do you see this problem? Thanks -Vincent _ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.latam.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JMS Issue - Threading?
Hi, I'm pretty new to cactus/junitee. We are using junitee from about last Spring. Have not moved to cactus yet. I have a test that sends a message to a JMS Topic. 2 MDBs listen to this topic. 1 of them sends the message to a queue. The test asserts that the message gets there. It uses the synchronous receive() method in JMS. This test works the first time, but then fails - the receive() method times out. The odd thing is that I can see the MDB sending the message successfully to the queue (in the log). I only see 2 threads in the log - a JMS Delivery Thread and the execute thread. I think that most likely this is an issue with either WebLogic, SonicMQ (our JMS provider) or the integration between them (Weblogic has a Foreign JMS Server config), but wanted to ask if this could be something in junitee. Anyone have any ideas? Thanks in advance. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Starting Websphere server from Ant script
Thanks Vincent, I read the docs It says generic name=My Container port=8080 startup target=mycontainer.start/ shutdown target=mycontainer.stop/ /generic I would like know how can I implement mycontainer.start and mycontainer.stop using websphere. the docs says How these targets are implemented is highly dependant on the container. Most likely you'll need to copy some files and use the java task to invoke a container-provided Java class that can start/stop the container. any idea about this. thanks for the reply.
Re: Starting Websphere server from Ant script
Hi Sam, Could you tell me how can I start , deploy and stop using generic name=My Container port=8080 startup target=mycontainer.start/ shutdown target=mycontainer.stop/ /generic in this task. I am new to Ant and Cactus. The docs in Cactus site says ow these targets are implemented is highly dependant on the container. Most likely you'll need to copy some files and use the java task to invoke a container-provided Java class that can start/stop the container. any idea about this. could you give some help in this. Thanks. Johnson