jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Struts 2 and effective testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 and effective testing" Watch "Struts 2 and effective testing" New topic

Struts 2 and effective testing

Neal Carey

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: 471

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://aspose.com/file-tools
subject: Struts 2 and effective testing
It's not a secret anymore!