How to StrutsJUnit4TestCase?
Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hi Christian, SJ4TC is /relatively/ young [1] and so there are no many documented use cases on the web. Anyway it would not be difficult to add the executeAction method. I'm going to open a new issue. [1] https://issues.apache.org/jira/browse/WW-3403 On 3 August 2011 13:56, Christian Grobmeier grobme...@gmail.com wrote: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara
Re: How to StrutsJUnit4TestCase?
Opened https://issues.apache.org/jira/browse/WW-3667 On 3 August 2011 18:07, Maurizio Cucchiara maurizio.cucchi...@gmail.comwrote: Hi Christian, SJ4TC is /relatively/ young [1] and so there are no many documented use cases on the web. Anyway it would not be difficult to add the executeAction method. I'm going to open a new issue. [1] https://issues.apache.org/jira/browse/WW-3403 On 3 August 2011 13:56, Christian Grobmeier grobme...@gmail.com wrote: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- Maurizio Cucchiara
Re: How to StrutsJUnit4TestCase?
Thanks Maurizio. One of my key problems is the fact that there seems to be a problem with the spring integration when I extend this implementation. It says, i need to add the ContextListener to the web.xml. I was not able to figure out how I could enable my applicationContext. Finally I left out the Struts-Testcase and used: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={classpath*:applicationContext.xml}) without it. Some javadocs on the class on how to do that would be fine also, maybe in combination with the issue you opened. Cheers On Wed, Aug 3, 2011 at 6:13 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Opened https://issues.apache.org/jira/browse/WW-3667 On 3 August 2011 18:07, Maurizio Cucchiara maurizio.cucchi...@gmail.comwrote: Hi Christian, SJ4TC is /relatively/ young [1] and so there are no many documented use cases on the web. Anyway it would not be difficult to add the executeAction method. I'm going to open a new issue. [1] https://issues.apache.org/jira/browse/WW-3403 On 3 August 2011 13:56, Christian Grobmeier grobme...@gmail.com wrote: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S1] Validator configuration error [bump]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 7/19/2011 5:59 PM, Dave Newton wrote: If it works, I wouldn't worry about it. I'm not sure if anybody is planning any further 1.x releases, to be honest; maybe if a patch is filed against the ticket someone would apply it, but I'm not sure who (Paul, are you still doing S1 stuff?) I can always just patch my local struts-config.dtd file to get rid of the error. I'm happy to supply a (nearly trivial) patch to the 1.x branch just in case there is another release. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk45fhUACgkQ9CaO5/Lv0PD6NQCfehO3D0AJNLeLwmkAlAFONMvm nm0Anj48jRFjPu3mU7HGVzkB1DB+sPFr =3FHl -END PGP SIGNATURE- - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hi, at the moment I found out to test without that class. Not really a full test, but it works for my needs at the moment. Therefore I can wait until you have pushed your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
There you go: http://code.google.com/p/struts2-junit/ Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hi, at the moment I found out to test without that class. Not really a full test, but it works for my needs at the moment. Therefore I can wait until you have pushed your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[ANN] struts2-junit utility classes for testing with JUnit 4
Hi, I'd like to introduce this simple library, which is based on the StrutsJUnit4TestCase class that comes with the Struts 2 distribution. Usage This library is primarily intended for integration tests, meaning you can test your actions and interceptors against a complete struts interceptor stack, and more generally, against a custom made struts.xml file. Actually the library is only 2 classes: * StrutsBaseTestCase: A base class from which your test cases would need to extend. * @Config: An annotation specifying which action to execute in the test. This annotation is versatile enough to let you configure test class commonalities only one time at class definition, and introduce exceptions at test method level. The project is hosted in google code: http://code.google.com/p/struts2-junit/ Regards, Gabriel - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org