Hi,

I think maybe you wrote some validation code for the input parameters
in the ActionForm, and you want to test these validation method?

If it is true, I think you can separate the validation code to single
method. Since the implementation has no relationship with HTTP so you
can test the method with JUnit.


Leon

--- "J. B. Rainsberger" <[EMAIL PROTECTED]> :

---------------------------------
kavitha kandababu wrote:

> Is it possible to use junit to test jsp pages.I am
> using struts framework and j2ee as middle tier .I
> guess junit cannot be used independently (without
> tools like cactus) to test server components .....or
> is it possible.
>
> Suppose my action class calls a simple function to
> load the formbean for a jsp can I test this entire
> flow using junit.

Why is your Action class loading a Form bean for a JSP? Doesn't Struts
do that for you automatically? Struts provides the Form object as a
parameter to the Action object, so what do you need to test?
--
J. B. (Joe) Rainsberger
Diaspar Software Services
http://www.diasparsoftware.com
Author, JUnit Recipes: Practical Methods for Programmer Testing

Yahoo! Groups Sponsor  ADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/junit/

   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/




Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=groups/S=:HM/A=2434971/rand=613498645


Yahoo! Groups Links

Reply via email to