Conclusions


This chapter introduced a process of developing, building, deploying, and testing Struts applications. The process presented was a basic version of the process used on many Jakarta projects.

This process incorporates many elements of Extreme Programming (XP). XP is an approach to development that, among other things, stresses ongoing, integrated testing as a core part of the development process.

Specific focus areas within this chapter were

  • Defining a standard directory structure for development. This allows automating the process of building, deploying, and testing your Struts application. A recommended directory structure was presented.

  • Creating a build.xml build script to be used by the Ant build tool to automate building, deploying, and testing the application.

  • A general approach to integrating ongoing testing into the overall development process was presented. This approach discussed the two primary approaches to testing programs, such as Struts, that require an application server to run.

  • The first approach presented was mock object testing. In this testing approach, Java programs are created that emulate a real application server using test objects, or mock objects. Mock objects are created for the request, response, session, and other objects required by your Struts application to allow it to be tested .

  • The second approach presented was in-container testing. In this testing approach, your Struts application is deployed into an application server prior to testing. In addition to your Struts application, additional software is deployed into the application server to listen for testing requests made by client testing software which is run via the Ant build tool. The Cactus testing framework was used in this chapter for both the client- and server-based components of in-container testing.

  • JUnit was used as the core testing tool in this chapter. It's run using <junit> tasks that allow the execution of JUnit tests using the Ant build tool. In addition, the StrutsTestCase extension to JUnit was used for both mock object and in-container testing of the example Struts application.



Struts Kick Start
Struts Kick Start
ISBN: 0672324725
EAN: 2147483647
Year: 2002
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net