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. Tools for testing with mock objects
    4. Issues with conventional mock objects
    5. An example
    6. 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. Regular versus strict expectations
    5. Recording results for an expectation
    6. Matching invocations to specific instances
    7. Flexible matching of argument values
    8. Specifying invocation count constraints
    9. Explicit verification
    10. Capturing invocation arguments for verification
    11. Delegates: specifying custom results
    12. Cascading mocks
    13. Partial mocking
    14. Capturing implementation classes and instances
    15. Instantiation and injection of tested classes
  4. Faking
    1. Mock methods and mock-up classes
    2. Applying mock-ups
    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 mock-ups between tests
    9. Global mock-ups
    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
    10. Standalone mode