It looks like the home page for mockstrutstestcase is your best starting
point.
http://strutstestcase.sourceforge.net/
hem hem on 20/10/05 23:49, wrote:
Hi Adam,
thanks for your reply,
i my struts(version 1.2) web app,i am using tiles,
action form are submitted through tiles(jsp)templates.
i am having a helper class which copies property values from form bean to model
object.
i call the methods in this helper class from my action class and put some data
in the session.
i think you got complete picture of my app.there is no businees logic in my
action(just copying proprties and putting them in session).
i want to test my action class for below:
1.when the form is populated or not properly
2.am i going to the next page properly(testing action forward and action
mapping)
3.us the information is properly set into the session all these
common struts action things.
if you can suggest me the best approach i will start with that.
i heard mockstrutstestcase is there.
i dont know how to use it.
can you please suggest me the best simple tutorial so thst it saves my time.
struts version=1.2
mochstrutstestcase version=2.3
your suggestions are very much appreciated
regards and thanks in advance
Adam Hardy <[EMAIL PROTECTED]> wrote:
hem hem on 20/10/05 22:57, wrote:
i am using struts jar 1.2 in my web app.
i want to test my struts action classes and jsps using Junit
are there any nice tutorials on this.
i want to use MockStrutsTestcase in my junit tests
What precisely do you want to test? There are many different junit
compatible test tutorials but when I went looking, I was disappointed
because they all focused on a little niche of testing rather than a
broad basis offering the whole range.
Right now what comes to mind is:
(1) the model, if you have any model / business logic in your actions
(which is not advisable, since it's easier testing it if seperate), or
perhaps validation of http request params.
(2) the controller, or flow of control logic - testing ActionForwards
returned, looking in mock request or session scopes for expected objects
(3) view logic, presentation code - do JSPs compile, are all required
Tiles defined, do JSPs throw exceptions at runtime.
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]