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. Interface resolution
    3. 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. Mocking unspecified implementation classes
  4. Faking
    1. Fake methods and fake classes
    2. Applying fake classes
    3. Faking unspecified implementation classes
    4. Faking class initializers
    5. Accessing the invocation context
    6. Proceeding into the real implementation
    7. Reusing fakes between tests
    8. Global fakes
    9. Applying AOP-style advice
  5. Measuring code coverage
    1. The coverage metric
    2. Types of coverage output
    3. Configuring the coverage tool
    4. Aggregated reports for multiple test runs
    5. Checking minimum coverage
    6. Activating coverage in a Maven project
    7. Turning coverage off