My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Java Extreme Programming Cookbook
By
Eric M. Burke
,
Brian M. Coyner
March 2003
Pages: 288
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
XP Tools
Java and XP
Tools and Philosophies
Open Source Toolkit
Chapter 2
XP Overview
What Is XP?
Coding
Unit Testing
Refactoring
Design
Builds
Chapter 3
Ant
Introduction
Writing a Basic Buildfile
Running Ant
Providing Help
Using Environment Variables
Passing Arguments to a Buildfile
Checking for the Existence of Properties
Defining a Classpath
Defining Platform-Independent Paths
Including and Excluding Files
Implementing Conditional Logic
Defining a Consistent Environment
Preventing Build Breaks
Building JAR Files
Installing JUnit
Running Unit Tests
Running Specific Tests
Generating a Test Report
Checking Out Code from CVS
Bootstrapping a Build
Chapter 4
JUnit
Introduction
Getting Started
Running JUnit
assertXXX( ) Methods
Unit Test Granularity
Set Up and Tear Down
One-Time Set Up and Tear Down
Organizing Tests into Test Suites
Running a Test Class Directly
Repeating Tests
Test Naming Conventions
Unit Test Organization
Exception Handling
Running Tests Concurrently
Testing Asynchronous Methods
Writing a Base Class for Your Tests
Testing Swing Code
Avoiding Swing Threading Problems
Testing with the Robot
Testing Database Logic
Repeatedly Testing the Same Method
Chapter 5
HttpUnit
Introduction
Installing HttpUnit
Preparing for Test-First Development
Checking a Static Web Page
Following Hyperlinks
Writing Testable HTML
Testing HTML Tables
Testing a Form Tag and Refactoring Your Tests
Testing for Elements on HTML Forms
Submitting Form Data
Testing Through a Firewall
Testing Cookies
Testing Secure Pages
Chapter 6
Mock Objects
Introduction
Event Listener Testing
Mock Object Self-Validation
Writing Testable JDBC Code
Testing JDBC Code
Generating Mock Objects with MockMaker
Breaking Up Methods to Avoid Mock Objects
Testing Server-Side Business Logic
Chapter 7
Cactus
Introduction
Configuring Cactus
Setting Up a Stable Build Environment
Creating the cactus.properties File
Generating the cactus.properties File Automatically
Writing a Cactus Test
Submitting Form Data
Testing Cookies
Testing Session Tracking Using HttpSession
Testing Servlet Initialization Parameters
Testing Servlet Filters
Securing Cactus Tests
Using HttpUnit to Perform Complex Assertions
Testing the Output of a JSP
When Not to Use Cactus
Designing Testable JSPs
Chapter 8
JUnitPerf
Introduction
When to Use JUnitPerf
Creating a Timed Test
Creating a LoadTest
Creating a Timed Test for Varying Loads
Testing Individual Response Times Under Load
Running a TestSuite with Ant
Generating JUnitPerf Tests
Chapter 9
XDoclet
Introduction
Setting Up a Development Environment for Generated Files
Setting Up Ant to Run XDoclet
Regenerating Files That Have Changed
Generating the EJB Deployment Descriptor
Specifying Different EJB Specifications
Generating EJB Home and Remote Interfaces
Creating and Executing a Custom Template
Extending XDoclet to Generate Custom Files
Creating an Ant XDoclet Task
Creating an XDoclet Tag Handler
Creating a Template File
Creating an XDoclet xdoclet.xml File
Creating an XDoclet Module
Chapter 10
Tomcat and JBoss
Introduction
Managing Web Applications Deployed to Tomcat
Hot-Deploying to Tomcat
Removing a Web Application from Tomcat
Checking If a Web Application Is Deployed
Starting Tomcat with Ant
Stopping Tomcat with Ant
Setting Up Ant to Use Tomcat's Manager Web Application
Hot-Deploying to JBoss
Hot-Deploying a Web Application to JBoss
Testing Against Multiple Servers
Chapter 11
Additional Topics
Introduction
Testing XML Files
Enterprise JavaBeans Testing Tools
Avoiding EJB Testing
Testing Swing GUIs
Testing Private Methods
Colophon
Return to
Java Extreme Programming Cookbook