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]

Reply via email to