JMockit An automated testing toolkit for Java

The JMockit Testing Toolkit Tutorial

  1. Introduction
    1. Automated developer testing and test isolation
    2. Testing with mock objects
    3. An example
    4. Running tests with JMockit
  2. Testing enterprise applications
    1. An example
    2. Trade-offs of the approach
  3. Mocking
    1. Mocked types and instances
    2. Expectations
    3. The record-replay-verify model
    4. Instantiation and injection of tested classes
    5. Recording results for an expectation
    6. Flexible matching of argument values
    7. Specifying invocation count constraints
    8. Explicit verification
    9. Delegates: specifying custom results
    10. Capturing invocation arguments for verification
    11. Cascading mocks
    12. Matching invocations to specific instances
    13. Partial mocking
    14. Capturing implementation classes and instances
    15. Full verification and other variations
  4. Faking
    1. Fake methods and fake classes
    2. Applying fake classes
    3. Faking an interface
    4. Faking unspecified implementation classes
    5. Faking class initializers
    6. Accessing the invocation context
    7. Proceeding into the real implementation
    8. Reusing fakes between tests
    9. Global fakes
    10. Applying AOP-style advice
  5. Measuring code coverage
    1. Line coverage
    2. Path coverage
    3. Data coverage
    4. Types of coverage output
    5. Configuring the coverage tool
    6. Aggregated reports for multiple test runs
    7. Checking minimum coverage
    8. Activating coverage in a Maven project
    9. Turning coverage off