In my action, I have a reference to Http request and it requires to access
the HttpServletRequest object, so I can not easily test the action with just
calling the execute method and comparing the result. So, I have found out a
solution from the link that I refere before, I did not write the
BaseStrutsTestCase, I modified the class. It creates mock objects and helps
to test my action outside of the server environment. It takes the advantage
of the  ActionProxy. All I did was to simulate some user input, and
remaining part is handled by this helper class.


Antonio Petrelli-3 wrote:
> 
> 2008/6/26 ezgi <[EMAIL PROTECTED]>:
>> If I add the location of web.xml or any other thing to here
>> private static final String CONFIG_LOCATIONS = "file:src/struts.xml" ;
>> I got a parsing error. I am not very experienced with tiles, I just test
>> the
>> code in a big project. The problem is , if I do not include tiles, my
>> unit
>> test works perfectly. If you did not look at the BaseStrutsTEstCase
>> class,
>> it is a helper class to create an artificial environment for requests and
>> interceptors. May be my problem is related to the jUnit part, but why I
>> can't test with tiles?
> 
> Just one question: how are you configuring the "artificial environment"?
> 
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18133546.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to