liveBook · Manning

Integration test

As explained in Clean Applications with Hexagonal Architecture

A test that verifies interactions between multiple application components or an application and an external system.

When application behavior depends on transaction boundaries, test the resulting behavior with a focused Spring integration test—not merely the presence of @Transactional. section 8.7

Check the transaction outcome, accounting for Spring’s default proxy behavior:

  • Verify rollback, propagation, or transaction boundaries when the application relies on them. section 8.7
  • A same-class method call does not pass through the proxy, so an inner method’s @Transactional annotation does not start a transaction. section 8.7

How Clean Applications with Hexagonal Architecture covers it

How deep it goes
Traces Spring proxy behavior for same-class calls and focuses verification on transaction outcomes rather than annotations.
Examples
Checks rollback, propagation, and transaction boundaries, including the same-class call that bypasses the proxy.
What you can do after
Apply focused Spring integration tests to verify transaction outcomes instead of annotation presence.
How it connects
Connects Spring integration testing with transaction management and proxy behavior.

Also explained in

Compare how 40 books explain integration test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Clean Applications with Hexagonal Architecture. The section links point to the parts of the book it draws on.