Cover image for Professional java tools for extreme programming : Ant, Xdoclet, JUnit, Cactus, and Maven
Title:
Professional java tools for extreme programming : Ant, Xdoclet, JUnit, Cactus, and Maven
Publication Information:
Indianapolis, Ind. : Wiley Publishing, 2004
ISBN:
9780764556173
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010068264 QA76.73.J38 P76 2004 Open Access Book Book
Searching...

On Order

Summary

Summary

What is this book about?

The Extreme Programming (XP) methodology enables you to build and test enterprise systems quickly without sacrificing quality. In the last few years, open source developers have created or significantly improved a host of Java XP tools, from XDoclet, Maven, AntHill, and Eclipse to Ant, JUnit, and Cactus. This practical, code-intensive guide shows you how to put these tools to work -- and capitalize on the benefits of Extreme Programming.

Using an example pet store application, our expert Java developers demonstrate how to harness the latest versions of Ant and XDoclet for automated building and continuous integration. They then explain how to automate the testing process using JUnit, Cactus, and other tools, and to enhance project management and continuous integration through Maven and AntHill. Finally, they show you how to work with XP tools in the new Eclipse IDE.

Complete with real-world advice on how to implement the principles and practices of effective developers, this book delivers everything you need to harness the power of Extreme Programming in your own projects.

What does this book cover?

Here are some of the things you'll find out about in this book:

How to automate the building of J2EE apps and components with Ant and XDoclet Techniques for automating Java testing using JUnit Procedures for automating servlet, JSP, and other J2EE testing using Cactus Ways to automate Swing testing with Jemmy, JFCUnit, and Abbot How to manage projects using Maven Techniques for automating continuous integration with AntHill and Cruise Control How to harness plugins for JUnit, Cactus, and Ant in the Eclipse IDE Ways to implement Extreme Programming best practices

Who is this book for?

This book is for enterprise Java developers who have a general familiarity with the XP methodology and want to put leading Java XP tools to work in the development process.


Author Notes

Richard Hightower is Chief Mentor/Consultant for ArcMind, a full-service software development company. Rick is a software engineer by training who specializes in software development tools and processes, and developing enterprise applications using J2EE, XML, UML, JDBC, SQL, and open source technologies. Formerly he was the Senior Software Engineer for Java Architecture at Intel''s Enterprise Architecture Lab. Rick is the co-author of Professional Jakarta Struts , and he contributed two chapters to the book Mastering Tomcat .
Rick has spoken at a variety of industry conferences and events, including JavaOne, TheServerSide.com Software Symposium JDJEdge, WebServicesEdge, and the Complete Programmer Network software symposiums.

Warner Onstine is a founder and CTO of Interface Guru, a leading Web Usability firm where he consults on back-end technology issues with specific emphasis on how technology and usability work together to present the user with an easy-to-use interface. Warner also runs his own custom development shop, Sandcast Software, which focuses on community and team-oriented software.
Warner got his first computer, a TI-99 4/A, when he was 9 and almost immediately attempted to program a game in Basic on it, which did not work. He stubbornly refuses to get rid of that machine though, along with his trusty NeXT Turbo MonoStation, upon which he got his first taste of Objective-C. This eventually led to Java, skipping right over C++.
His strong community background soon led him to open source, where he has had the chance to meet and interact with several incredible individuals from Jakarta and other open source communities. This also has helped him to keep an open eye on the trends that will soon shape the new landscape--one of his specialties.
Another skill he has is in assisting companies with making the right choices at the right time, utilizing XP, in-depth knowledge of their subject area, and the currently available tools germane to their problem. Warner is also a co-founder and President of the Tucson Java Users Group, which he helped form in 2001, which keeps him rather busy at times. Previously, Warner worked at eBlox, Inc. (a Web development company), Intalio, Inc. (a bay-area Business Process Management Server company), and the University of Arizona Main Library on the Digital Library Team.

Paul Visan is an expert J2EE developer. He serves as a Principal Software Engineer for eBlox, Inc, where he finds that open source tools are invaluable to his work. Paul is a proud Romanian native, now living in the heart of Tucson Arizona. He is a regular contributor to IBM''s developerWorks, for which he has written a series of tutorials on Java Web Services. Paul would like to thank Andrew Barton, Nicholas Lesiecki, Tim Ryan, and Victoria McSherry for helping with this book.

Damon Payne currently works as the Microsoft Business Group manager for Centare Group, Ltd. in Milwaukee, WI. Damon is very passionate about open source technology in the Java and Microsoft .NET worlds. His other professional interests include Mobile development, data persistence patterns, and product development. When not programming or speaking Damon enjoys raising his wonderful daughter, Brooke, home theater, and music.

Joseph D. Gradecki is a software engineer at Comprehensive Software Solutions, where he works on their SABIL product, a enterprise-level securities processing system. He has built numerous dynamic, enterprise applications using Java, AspectJ, servlets, JSPs, Resin, MySQL, BroadVision, XML, and more. He is the author of Mastering JXTA and the coauthor of MySQL and Java Developer''s Guide (with Mark Matthews and Jim Cole). Joeholds Bachelors and Masters degrees in Computer Science and is currently pursuing a Ph.D.

Kate Rhodes is a self-taught programmer, serial entrepreneur, and occasional musician with a Japanese nickname and an unstoppable urge to learn new things, solve new problems, and write open source apps. She''s got too many pets, too many projects, and too little time. If she could afford an army of programming minions she''d have one.
She''s ranked better than most and worse than some. She''s worked in impressive places you''ve possibly heard of and unimpressive places you''ve never heard of. She''s done some stuff she''s very proud of and some she isn''t. And so long as life keeps offering up interesting new challenges for her to learn from, she''s happy. If you''re overcome with curiosity you can always see what Kate and her wife are up to at www.masukomi.org.

Robert Watkins is a Brisbane, Australia-based software developer of nine years'' experience. He''s been called a programmer, a software engineer, an architect, and a few other things (many unprintable), but mostly ignores the titles and does what he has to do. These days he is mostly working in J2EE and related technologies, and is a passionate advocate of agile development techniques. When not working, he spends most of his time with his wife and twin children, and when he gets a chance, he takes time out to read Terry Pratchett novels. Robert is also one of the developers on the CruiseControl project.

Erik Meade is an employee of Wells Fargo, who attended XPImmersionTwo, interviewed at XPImmersionThree, coached at XPImmersionFour, and hung out on the evenings of XPImmersionFive. He is the edior of junit.org and an evangelist of JUnit, Ant, CruiseControl, HttpUnit, Tomcat, and open source in general. He is also a contributor to JUnitPerf.


Table of Contents

Introductionp. xxv
Part I Key Concepts
Chapter 1 Introduction to Extreme Programmingp. 1
XP Overviewp. 1
Adopting XP?p. 9
Summaryp. 10
Chapter 2 J2EE Deployment Conceptsp. 11
The JAR Filep. 13
Web Applications and the WAR Filep. 15
Enterprise Beans and the EJB JAR Filep. 17
Enterprise Applications and the EAR Filep. 20
Conclusionp. 21
Chapter 3 Storing and Managing Code with CVSp. 23
The Benefits of Versioningp. 23
About CVSp. 24
CVS Foundationsp. 24
Setting Up CVS on the Serverp. 33
CVS Pitfalls and Solutionsp. 34
Part II Automated Building and Continuous Integration
Chapter 4 Ant Primerp. 37
Basics of Using Antp. 38
Standard Targetsp. 40
Conclusionp. 65
Chapter 5 Building Java Applications with Antp. 67
Hello World Model Projectp. 68
Hello World Application Projectp. 75
Hello World Main Projectp. 78
The Applet Projectp. 81
Hello World Recapp. 86
Conclusionp. 86
Chapter 6 Building J2EE Applications with Antp. 87
Hello Worldp. 87
Web Application Projectp. 88
Enterprise JavaBeansp. 104
EAR Enterprise Applicationp. 121
The Pet Store Case Studyp. 126
Summaryp. 129
Chapter 7 XDoclet Primerp. 131
What Is XDoclet?p. 131
Code Generation Templatingp. 133
Installing XDocletp. 134
Configure Antp. 134
A Simple Examplep. 136
XDoclet Tasks, Subtasks, and Templatesp. 141
XDoclet Mergingp. 143
Summaryp. 144
Chapter 8 Building J2EE Web Components with Ant and XDocletp. 145
Servlet Examplep. 145
Webdoclet Tagsp. 150
Using Ant for the Configurationp. 152
Using Ant Properties, Init-Params, and Filteringp. 154
Creating Taglibsp. 154
Using Eclipse with Webdocletp. 157
Summaryp. 167
Chapter 9 Building EJBs with Ant and XDocletp. 169
Generating XDoclet EJBsp. 169
Summaryp. 185
Chapter 10 Building Struts Apps with Ant and XDocletp. 187
Brief Introduction to Strutsp. 187
Installing Strutsp. 188
A Sample Applicationp. 188
Struts and XDocletp. 195
Summaryp. 198
Chapter 11 Creating Custom Ant Tasksp. 199
How Ant Worksp. 199
An Example Taskp. 200
A Skeleton Task Examplep. 201
Building a New Taskp. 203
Using the New Taskp. 208
Summaryp. 212
Chapter 12 Creating XDoclet Custom Tags and Templatesp. 213
XDoclet Architecturep. 213
A Simple Templatep. 216
Building an XDoclet Templatep. 217
Summaryp. 220
Part III Automated Java Testing
Chapter 13 Unit Testing with JUnitp. 221
Overview of JUnitp. 222
Case Study: Adding an Entity Bean to the Pet Storep. 234
Summaryp. 262
Chapter 14 Load Testing with JUnitPerfp. 263
JUnitPerf Conceptsp. 264
TimedTest Examplep. 264
LoadTest Examplep. 271
Case Studyp. 272
Summaryp. 278
Chapter 15 Defect Tracking with Bugzillap. 279
Enter Bugzillap. 280
Bugzilla Setupp. 280
Bugs in Bugzillap. 285
Securityp. 293
Summaryp. 296
Part IV Automated J2EE Testing
Chapter 16 Functional Testing with HttpUnitp. 297
Why Functional Testing?p. 297
Why HttpUnit?p. 298
HttpUnit Basicsp. 299
Advanced Topics in HttpUnitp. 309
Spider Examplep. 312
Summaryp. 318
Chapter 17 Performance Testing with JMeterp. 319
Overview of JMeterp. 319
JMeter Conceptsp. 320
Using JMeter to Test a Web Application Navigationp. 322
Using JMeter to Test the Web Application's Form Entryp. 327
Using JMeter to Test Performance of Our RDBMSp. 334
Case Study: The Pet Storep. 335
Summaryp. 342
Chapter 18 Cactus Primerp. 343
Why In-Container Testing?p. 343
Why Cactus?p. 346
Installing Cactusp. 347
Cactus Architecturep. 350
Cactus with Antp. 359
Summaryp. 360
Chapter 19 Testing Servlets and Filters with Cactusp. 361
Testing Servletsp. 361
Testing Filtersp. 365
Summaryp. 369
Chapter 20 JspTestCases and Testing Custom Tags with Cactusp. 371
Testing Simple Tagsp. 372
Testing Tag Attributes and Page Interactionp. 373
Testing Body Tagsp. 376
Testing Iteration Tagsp. 378
Server-Side Assertion Facilitiesp. 380
Working with Nested Tagsp. 381
Testing Auxiliary Tag Componentsp. 384
Case Study: The Pet Store with Custom Tagsp. 385
Summaryp. 391
Chapter 21 Testing EJBs with Cactusp. 393
Creating an Ant Buildfile to Run the Testp. 396
Case Study: Adding an Entity Bean to the Pet Storep. 397
Summaryp. 408
Chapter 22 Code Coverage with jcoveragep. 409
Why Code Coverage?p. 410
jcoverage Primerp. 411
100% Go Code and 80% Exception Handlingp. 416
Other Tools: GroboUtilsp. 422
Conclusionp. 423
Part V Automated Swing Testing
Chapter 23 Swing Testing with Jemmyp. 425
Jemmy Primerp. 426
Testing a Swing Application with Jemmyp. 427
Summaryp. 436
Chapter 24 Swing Testing with jfcUnitp. 437
jfcUnit Primerp. 438
Testing a Swing Application with jfcUnitp. 439
Summaryp. 445
Chapter 25 Swing Testing with Abbotp. 447
Abbot and Costello Primerp. 448
Recording and Using Our Testp. 452
Advantages of Abbotp. 455
Part VI Continuous Integration, Project Management, and IDEs
Chapter 26 Managing Projects with Mavenp. 457
Maven Primerp. 458
Maven Architecturep. 469
Understanding Jellyp. 472
Project Management with Mavenp. 475
Case Study: Managing Our Pet Store Project with Mavenp. 480
Summaryp. 488
Chapter 27 Automating Continuous Integration with CruiseControlp. 489
Basics of Using CruiseControlp. 491
CruiseControl Componentsp. 497
CruiseControl Life Cyclep. 502
Multiproject Supportp. 503
Enhancing Your Build Scriptsp. 503
Summaryp. 504
Chapter 28 Automating Continuous Integration with AntHillp. 507
AntHill Primerp. 507
Obtaining and Installing AntHillp. 509
An AntHill HelloWorldp. 515
Working with Dependenciesp. 523
Using AntHill with Petstorep. 524
Part VII API Tag Reference
Chapter 29 Ant Tag Referencep. 527
Ant Command Line Optionsp. 527
Ant Parent Elementsp. 528
Ant Key Tasksp. 532
Directory and File System Tasksp. 535
External Execution Tasksp. 539
File Library Tasksp. 545
File Readers, Writers, and Tokenizersp. 548
Source Control Tasksp. 549
Some Key Optional Tasksp. 551
Frequently Used Nested Parameters and Elementsp. 553
Chapter 30 Ant API Referencep. 557
Package org.apache.tools.antp. 558
Putting it All Togetherp. 582
Chapter 31 JUnit API Referencep. 585
Package junit.frameworkp. 585
Package junit.extensionsp. 600
Chapter 32 Cactus API Referencep. 607
Package org.apache.cactusp. 607
Package org.apache.cactus.utilp. 627
Package org.apache.cactus.serverp. 629
Chapter 33 HttpUnit API Referencep. 635
Package com.meterware.httpunitp. 635
Chapter 34 JUnitPerf API Referencep. 665
Package com.clarkware.junitperfp. 665
Part VIII Appendix
Appendix A Example Applications Used in This Bookp. 675
Simple Example: Model 2 Hello Worldp. 676
Case Study Example: The Pet Storep. 676
Baseline Version of the Pet Storep. 677
Setting Up the Database with Test Data: A Small Taste Of Antp. 687
Complete Listingsp. 692
Conclusionp. 712
Indexp. 713