Hexagonal Architecture - Adapter Testing
How should we test adapters? Should we use "integrated" or "isolated" tests?
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 is next Wednesday 19th March 17:00. Only Paid Members can join:
If you’re a Free Member, you can upgrade to attend the Live Q&A:
But what about testing adapters, e.g. testing database adapters, file adapters, external system adapters?
Should adapters be tested, are they worthy of being tested?
If adapters should be tested, should we test them in an integrated way or in an isolated way?