Re: How to StrutsJUnit4TestCase?

2011-08-16 Thread Maurizio Cucchiara
Hi guys, I updated the wiki section of Struts 2 JUnit Plugin [1], now there is the capability to override the struts config location. Feel free to correct/integrate the paragraph I inserted. [1] http://s.apache.org/jun Maurizio Cucchiara

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Christian Grobmeier
Hello Maurizio, I do some change on the S2 Junit4 plugin, now it should be simpler run a test with or without spring. Could you test the latest version of the aforementioned plugin [1]? Christian, is this [2] your use case? WDYT? is more intuitive? not tested it yet, but yes, that is what I

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Christian Grobmeier
Hello Gabriel, thanks for the work, it looks really good! What I not like so much is the fact that the test methods name must match the Actions name. I didn't find this very intuitive. I could use the @Config option, which I like much more, but then i face the problem that one test method = one

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Maurizio Cucchiara
Hi Christian, thanks for your precious feedback. your idea makes a lot of sense indeed! Unfortunately the struts.xml file name is one of the strong convention of S2 (the file name appears inside the code) and after a very quick look it would not seem simple to replace. Anyway, I'll take a deep

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Maurizio Cucchiara
Maurizio Cucchiara Ignore the last rows of my email: I did not read Christian's email about the Config annotation and I did not take a look at Gabriel's code. A good reason to take a deep look at this too. @Gabriel: In the meanwhile, considering your experience, if you have any suggestion, it will

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
Hi, You can execute more than one action in the same test method, as long as you create a new request and actionProxy, something like this: @Test @Config(actionName=foo) public void someTest() { ...some test code... // second request: request = new MockHttpServletRequest(); // and then

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
Hi Maurizio: I'm yet about to look at your code. My experience was pretty much the same as Christian, in that I wanted to use Junit 4 and the supporting classes were not very easy to work on. I think that you get more value when you can be productive in no time. One you can achieve this with

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Christian Grobmeier
Hello Maurizio, today i have tested with your code and everything works well so far. There is only one thing I cannot understand, but that is maybe not related to your code. When I run it junit in eclipse, everything fine. Do I do it with mvn test, it suddenly stops. I do not see any exception,

Re: How to StrutsJUnit4TestCase?

2011-08-04 Thread Maurizio Cucchiara
Hi guys, I do some change on the S2 Junit4 plugin, now it should be simpler run a test with or without spring. Could you test the latest version of the aforementioned plugin [1]? Christian, is this [2] your use case? WDYT? is more intuitive? [1]

How to StrutsJUnit4TestCase?

2011-08-03 Thread Christian Grobmeier
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

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Maurizio Cucchiara
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

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Maurizio Cucchiara
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

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Christian Grobmeier
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

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Gabriel Belingueres
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

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Christian Grobmeier
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

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Gabriel Belingueres
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