You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Dan R. Olsen III" <da...@gmail.com> on 2009/10/06 05:44:59 UTC

Struts2 and TestNG

I am looking for some good ways of using TestNG to test my actions. I 
know I can test them like any other POJO but I would like it to include 
all the interceptors if possible. Can anyone give me any good resources 
on how to do this. I am using Struts 2.1.6 and have the TestNG plugin. I 
am also using annotations to declare my actions.

Re: Struts2 and TestNG

Posted by "Dan R. Olsen III" <da...@gmail.com>.
The convention plugin is in the classpath for the tests.

On 10/6/2009 3:57 PM, Musachy Barroso wrote:
> also, make sure the convention plugin is in the classpath for the tests.
>
> musachy
>
> On Tue, Oct 6, 2009 at 2:22 PM, Alex Siman<al...@gmail.com>  wrote:
>    
>>
>> dolsen-2 wrote:
>>      
>>> Does this method work if I declare my actions with annotations instead of
>>> declaring them in struts.xml?
>>>
>>>        
>> Of course, I also declare actions w/ annos.
>>
>>
>> dolsen-2 wrote:
>>      
>>> It looks like from the errors I get that it is trying to read the action
>>> definitions from the struts.xml file.
>>>
>>>        
>> Tests must have struts.xml on class path. My struts.xml contains some
>> constants, interceptors, but not the actions.
>>
>> --
>> View this message in context: http://www.nabble.com/Struts2-and-TestNG-tp25762448p25776794.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>      
>
>
>    

Re: Struts2 and TestNG

Posted by Musachy Barroso <mu...@gmail.com>.
also, make sure the convention plugin is in the classpath for the tests.

musachy

On Tue, Oct 6, 2009 at 2:22 PM, Alex Siman <al...@gmail.com> wrote:
>
>
> dolsen-2 wrote:
>>
>> Does this method work if I declare my actions with annotations instead of
>> declaring them in struts.xml?
>>
> Of course, I also declare actions w/ annos.
>
>
> dolsen-2 wrote:
>>
>> It looks like from the errors I get that it is trying to read the action
>> definitions from the struts.xml file.
>>
> Tests must have struts.xml on class path. My struts.xml contains some
> constants, interceptors, but not the actions.
>
> --
> View this message in context: http://www.nabble.com/Struts2-and-TestNG-tp25762448p25776794.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 and TestNG

Posted by Alex Siman <al...@gmail.com>.

dolsen-2 wrote:
> 
> Does this method work if I declare my actions with annotations instead of
> declaring them in struts.xml?
> 
Of course, I also declare actions w/ annos.


dolsen-2 wrote:
> 
> It looks like from the errors I get that it is trying to read the action
> definitions from the struts.xml file.
> 
Tests must have struts.xml on class path. My struts.xml contains some
constants, interceptors, but not the actions.

-- 
View this message in context: http://www.nabble.com/Struts2-and-TestNG-tp25762448p25776794.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 and TestNG

Posted by "Dan R. Olsen III" <da...@gmail.com>.
Does this method work if I declare my actions with annotations instead 
of declaring them in struts.xml? It looks like from the errors I get 
that it is trying to read the action definitions from the struts.xml file.

On 10/5/2009 10:00 PM, Alex Siman wrote:
> Look here:
> http://struts.apache.org/2.x/docs/testing-actions.html
>
>
> dolsen-2 wrote:
>    
>> I am looking for some good ways of using TestNG to test my actions. I
>> know I can test them like any other POJO but I would like it to include
>> all the interceptors if possible. Can anyone give me any good resources
>> on how to do this. I am using Struts 2.1.6 and have the TestNG plugin. I
>> am also using annotations to declare my actions.
>>
>>
>>      
>    

Re: Struts2 and TestNG

Posted by Alex Siman <al...@gmail.com>.
Look here:
http://struts.apache.org/2.x/docs/testing-actions.html


dolsen-2 wrote:
> 
> I am looking for some good ways of using TestNG to test my actions. I 
> know I can test them like any other POJO but I would like it to include 
> all the interceptors if possible. Can anyone give me any good resources 
> on how to do this. I am using Struts 2.1.6 and have the TestNG plugin. I 
> am also using annotations to declare my actions.
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts2-and-TestNG-tp25762448p25762551.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org