Chapter 1. JUnit jump-start
Figure 1.1. Execution of the JUnit distribution sample tests using the text test runner
Figure 1.2. Execution of the first JUnit test CalculatorTest using the text test runner
Chapter 2. Exploring core JUnit
Chapter 3. Mastering JUnit
Chapter 4. Software testing principles
Figure 4.1. The five types of tests
Figure 4.2. A JMeter throughput graph
Figure 4.3. Interaction among the three unit test types: functional, integration, and logic
Chapter 5. Test coverage and development
Figure 5.1. Partial test coverage with black box tests
Figure 5.2. Complete test coverage using white box tests
Figure 5.3. A Cobertura code-coverage report
Figure 5.4. Class code coverage with Cobertura
Figure 5.5. A typical application development lifecycle using the continuous integration principle
Figure 5.6. The different types of tests performed on each platform of the development cycle
Chapter 6. Coarse-grained testing with stubs
Figure 6.2. Adding a test case and replacing the real web resource with a stub
Figure 6.3. Testing the JettySample class in a browser
Figure 6.5. Result of executing TestWebClient1 (which uses the StubHttpURLConnection)
Chapter 7. Testing with mock objects
Figure 7.2. The sample HTTP application before introducing the test
Figure 7.3. The steps involved in a test using mock objects
Figure 7.4. Running TestWebClient with the new close expectation
Chapter 8. In-container testing
Chapter 9. Running JUnit tests from Ant
Figure 9.1. Running the build file from the command line
Chapter 10. Running JUnit tests from Maven2
Figure 10.1. Directory structure after creating the project
Figure 10.2. Maven produces nice website documentation for the project.
Figure 10.3. Execution of JUnit tests with Maven2
Figure 10.4. HTML report from the Maven Surefire Report plug-in
Chapter 11. Continuous integration tools
Figure 11.1. Continuous integration scheme
Figure 11.2. Executing CruiseControl for the first time
Figure 11.3. CruiseControl control panel in the browser
Figure 11.4. Email notification from CruiseControl server
Figure 11.5. Hudson initial startup screen
Figure 11.6. Hudson configuration screen
Figure 11.7. Job-configuration screen in Hudson
Chapter 12. Presentation-layer testing
Figure 12.1. Sample form and alert
Chapter 13. Ajax testing
Figure 13.1. New pages are downloaded for each interaction in a web-classic application.
Figure 13.2. Relevant portions of a page downloaded for each Ajax web application interaction
Figure 13.3. A simple Ajax form
Figure 13.4. The JsUnit test runner
Chapter 14. Server-side Java testing with Cactus
Figure 14.1. Lifecycle of a Cactus test
Chapter 15. Testing JSF applications
Figure 15.1. Architectural overview of a JSF application
Figure 15.2. The two screens of the MusicStore application
Figure 15.3. Results from the execution of our JSFUnit tests in a browser
Chapter 16. Testing OSGi components
Chapter 18. Testing JPA-based applications
Appendix B. Extending the JUnit API with custom runners and matchers
Figure B.2. Results from executing the tests, including the custom matcher
Appendix C. The source code for the book
Appendix D. JUnit IDE integration
Figure D.1. Eclipse workspace when all the book projects have been imported
Figure D.2. Running the TestWebClient1 test case in Eclipse using the built-in JUnit plug-in
Figure D.3. Adding the JDK ivy-[version].jar to the Ant classpath in Eclipse
Figure D.4. Eclipse displays the Ant view.
Figure D.5. The Ant view displays all the Ant targets found in build.xml.
Figure D.6. Result of executing the compile Ant target for the ch09-ant project
Figure D.8. Our test passes when we fix the error and save the file.
Figure D.9. Import Eclipse projects into NetBeans.
Figure D.10. Compilation problems with NetBeans
Figure D.11. Resolved source folders
Figure D.12. Result from executing a sample JUnit test case
Figure D.13. Results from executing the Ant script in NetBeans
Appendix E. Installing software