Hi
Guys,
I am trying
to unit-test my individual classes using cactus. I am using struts 1.0 beta . I
mapped each jsp page to an Action class. What i want to do is set the values of
the ActionForms from the html (jsp) page and when i submit the info, the
corresponding ActionTest class kicks in and i get a result back stating whether
the test is a success or a failure. Does cactus support this kinf of testing
?
The
reson for my question is.. if i take the Login scenario as an example........ I
can have a valid login (or) invalid login. Right now i have hardcoded the login
and password when unit testing the LoginAction. I am using the ServletRedirector. When we go live, this hardcoded
values will not exist anymore. So if any changes are made in the future, the
test cases will fail. I was thinking of using the JspRedirector for having an interactive testing (where the login and
password are entered at runtime). Is it possible. any code/suggestions will be
helpful.
cheers,
Amar..
--