We'll be using Struts 2 for the development of a new UI framework. What are the key things that a test engineer needs to understand about Struts 2 to ensure an effective approach? And how can you suggest they get started?
Joined: Jan 28, 2008
The effective testing in struts 2 over struts 1 is in unit testing, since actions are not coupled with the servlet API. As for test engineers, I don't think that there is anything specific for them to know about struts 2, unless they are the ones who are going to write the unit tests, or do white box testing.
While Struts 2 hides away the HttpServletRequest and HttpServletResponse classes from the developers, it still allows developers to code the action class in such a way that is tightly coupled with the servlet API.
It is perhaps more important to enforce that no developer shall make any references to the servlet API from their action classes. By doing so, it is easier to unit test the action classes, which are POJO.