recall

← recall

test harness (Release It!) pattern

An external system you build specifically to behave badly: hangs, returns malformed responses, drops connections, takes 30 seconds to reply. Your service runs against the harness in test/staging. The mocks are usually too well-behaved to find real failure modes.

An external system you build specifically to behave badly: hangs, returns malformed responses, drops connections, takes 30 seconds to reply. Your service runs against the harness in test/staging. The mocks are usually too well-behaved to find real failure modes.

symptoms

  • failure modes only seen in prod
  • integration tests pass but prod blows up

causes

  • mocks are too polite
  • no test coverage of slow / malformed / dropped paths

fixes

  • build a deliberately bad harness
  • fault injection at the integration layer
  • periodic chaos tests against the harness

you might say

  • test harness
  • evil mock
  • chaos test

related

topics: resilience, testing

references: