0%

Book Description

JUnit, created by Kent Beck and Erich Gamma, is an open source framework for test-driven development in any Java-based code. JUnit automates unit testing and reduces the effort required to frequently test code while developing it.

While there are lots of bits of documentation all over the place, there isn't a go-to-manual that serves as a quick reference for JUnit. This Pocket Guide meets the need, bringing together all the bits of hard to remember information, syntax, and rules for working with JUnit, as well as delivering the insight and sage advice that can only come from a technology's creator.

Any programmer who has written, or is writing, Java Code will find this book valuable. Specifically it will appeal to programmers and developers of any level that use JUnit to do their unit testing in test-driven development under agile methodologies such as Extreme Programming (XP) [another Beck creation].

Table of Contents

  1. 1. JUnit Pocket Guide
    1. Automating Tests
    2. Why Test?
      1. Time
      2. “Perfect” is a Verb
    3. JUnit’s Goals
    4. Fixtures
      1. More setUp( ) than tearDown( )
      2. Variations
      3. Suite-Level Setup
    5. Testing Exceptions
    6. JUnit’s Implementation
    7. JUnit API
      1. Overview
      2. Assert
      3. Test
      4. TestCase
      5. TestSuite
      6. TestResult
      7. Package Structure
    8. Test-First Programming
      1. Factorial Example
      2. Test-First Programming in Practice
    9. Stubs
      1. Stubs and Good Design
      2. Self-Shunting
    10. Other Uses for Tests
      1. Debugging Tests
      2. Learning an API with Tests
      3. Documenting Assumptions with Tests
      4. Cross-Team Tests
    11. Story of JUnit
    12. Extending JUnit
      1. Extensions
    13. JUnit and Ant
      1. More About Running Tests
      2. Formatting Feedback
      3. Conclusion
    14. Running JUnit Standalone
      1. Text
      2. AWT
      3. Swing
    15. JUnit and IDEs
      1. Eclipse
        1. Setting up a project so you can write tests
        2. Writing tests
        3. Running tests
        4. Extensions
      2. JBuilder
        1. Setting up a project so you can write tests
        2. Writing tests
        3. Running tests
      3. IntelliJ IDEA
        1. Setting up a project so you can write tests
        2. Writing tests
        3. Running tests
    16. Test Infection
    17. Bibliography
    18. Acknowledgments
  2. Index
  3. About the Author
  4. Copyright
18.224.59.145