Optivem Journal

Optivem Journal

Share this post

Optivem Journal
Optivem Journal
Hexagonal Architecture - Adapter Testing
Copy link
Facebook
Email
Notes
More

Hexagonal Architecture - Adapter Testing

How should we test adapters? Should we use "integrated" or "isolated" tests?

Valentina Jemuović's avatar
Valentina Jemuović
Mar 14, 2025
∙ Paid
8

Share this post

Optivem Journal
Optivem Journal
Hexagonal Architecture - Adapter Testing
Copy link
Facebook
Email
Notes
More
4
3
Share

When I read Alistair’s original article Hexagonal Architecture, I noticed only one type of test mentioned in the diagram - the “test harness adapter“ which targets the user-side API, i.e. targeting the driving ports.

Testing driving ports (spanning the hexagon in isolation) had a clear value - providing regression bug protection in business logic.


📢 My next Live Q&A Session about Unit Tests is on Wed 30th April 17:00. If you’re an Optivem Journal paid member, get your 100% discount ticket.

Register now

Upgrade to join the Live Q&A for free:


But what about testing adapters, e.g. testing database adapters, file adapters, external system adapters?

  1. Should adapters be tested, are they worthy of being tested?

  2. If adapters should be tested, should we test them in an integrated way or in an isolated way?

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Valentina Jemuović, Optivem
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More