This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 and effective testing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Struts 2 and effective testing" Watch "Struts 2 and effective testing" New topic
Author

Struts 2 and effective testing

Neal Carey
Greenhorn

Joined: Mar 05, 2008
Posts: 3
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

Joined: Jan 28, 2008
Posts: 460
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.


Visit my blog: http://jnassef.blogspot.com/
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
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.


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Struts 2 and effective testing
 
Similar Threads
Session checking with Struts 2
Action class in Struts
WA #1.....word association
Struts interview questions
Best AJAX framework library for Struts.