Hi,

I was using the tutorial-struts2 project to find some ideas on how to test
Struts2 actions.
The project latest update seem to dates back to May 2008 and I was wondering
if you would consider things differently today.

Ideally, I think you'd rather have Struts2 action layer tested in isolation
with mock/stub managers. One could then avoid loading the ORM layer for each
test and avoid transaction management as well.

That being said, it doesn't really matter, my point being the importance of
testing this layer itself.
If you do thorough unit testing on the Dao layer, on the Service/Manager
layer, and integration testing with Webtest, then the Struts2 layer is
becoming so thin that I'm wondering if it's actually useful to test it.
There'll probably always be action methods that are quite complexes and
worth testing but for most of them I don't see the point. I feel the action
mechanics itself becomes to the Struts2 framework.

I'm not familiar at all with webtests so I'm a bit confused on what belong
to this layer versus to the Struts2 action one. If you want to test
validation, what would you do? Seems to naturally belongs to webtest to me,
or is it testable on the Struts2 layer?

Tests take a lot of time to develop and maintain and I find it quite
difficult to get to the right level of testing.
I'd be really interested in any experience sharing. 

-nodje
-- 
View this message in context: 
http://www.nabble.com/Layer-testing-in-Appfuse-tp25712277s2369p25712277.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to