• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 and effective testing

 
Neal Carey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic