Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Test more and better with less friction

Avatar for John John
March 21, 2026

Test more and better with less friction

Testing in modern software development is, and has always been, a
challenge for the industry. Everyone claims to want to do more of it but often finds themselves falling short. Some find testing to be the most tedious part of their job.

Testing has become more complicated in recent years due to the popularity of microservices and other distributed architectures. However, the way we tested it mostly stayed the same.

This talk will explore practical techniques, tools, and more to make testing easier and more approachable, to test more with less. Some of the things we will look at are TestContainers, contract testing and testable code and architectures.

Avatar for John

John

March 21, 2026
Tweet

More Decks by John

Other Decks in Programming

Transcript

  1. This talk • Introduction and theory • Managing external dependencies

    • Testcontainers • API-mocking • Contract testing • Why your unit tests are a mess (and how to fix it)
  2. About me • Consultant @ bspoke • Tech Lead •

    Architect • Senior Developer • Subject Manager • Focus on developer processes
  3. About me • Consultant @ bspoke • Tech Lead •

    Architect • Senior Developer • Subject Manager • Focus on developer processes Lazy
  4. • Costs more to discover issues in production. • Faster

    deliveries. • Enables automation. • Creates a safer environment for developers.
  5. Developers should not test manually. And if you have to,

    your test strategy isn’t good enough.
  6. System Test our code Verify we don’t break callers Test

    the system as a whole Test integrations
  7. No manual setup required – just works Test runs execute

    the same on local machine and pipeline Easy to match version for dependency with version in production
  8. No manual setup required – just works Test runs execute

    the same on local machine and pipeline Easy to match version for dependency with version in production Demo time!
  9. System Other system Some environment Dev machine System Pipeline Integration

    test System Other devs machines External environments
  10. System Other system Some environment Dev machine System Pipeline Integration

    test System Other devs machines Devs making changes Ops making changes External environments
  11. System A System B Request Response Contract Expected request Expected

    response Response from contract Request from contract
  12. System A System B Request Response Contract Expected request Expected

    response Response from contract Request from contract Cloud contract Demo time!
  13. Unit testing Sociable unit tests Solitary unit tests Focused on

    testing behavior Focused on testing interactions
  14. Sociable unit testing Interface Interface Interface Interface Interface Interface Interface

    Interface Interface Repository Repository Repository Repository
  15. Interface Sociable unit testing Interface Interface Interface Repository Interface Interface

    Interface Repository Repository Interface Repository Repository Interface Interface
  16. Interface Sociable unit testing Interface Interface Interface Repository Interface Interface

    Interface Repository Repository Interface Repository Repository Interface Interface Sociable unit tests Solitary unit tests 1 class instance 3 mocks 6 class instances 5 mocks/tables
  17. TransactionService Responsible for everything related to transactions Create transaction TransactionRepository

    AccountService Update account AccountRepository BonusService BonusRepository
  18. TransactionService Responsible for everything related to transactions Create transaction TransactionRepository

    AccountService Update account AccountRepository BonusService BonusRepository Bonus payout Create transaction
  19. TransactionService Responsible for everything related to transactions Create transaction TransactionRepository

    AccountService Update account AccountRepository BonusService BonusRepository Bonus payout BonusPayoutService
  20. CreateTransactionUseCase BonusPayoutUseCase TransactionRootAggregate Account BonusRootAggregate Domain layer Create transaction Bonus

    payout Application layer TransactionRepository AccountRepository BonusRepository Database layer
  21. Service API Integration Application logic Input DB/Kafka/External calls/etc Domain Business

    logic • No database calls • No web calls • No dependencies
  22. Service API Integration Application logic Input DB/Kafka/External calls/etc Domain Business

    logic • No database calls • No web calls • No dependencies Unit test this High-level test to verify that system is put together correctly
  23. Acknowledgement • Practical test pyramid (Ham Vocke): https://martinfowler.com/articles/practical-test-pyramid.html • TDD,

    where did it all go wrong? (Ian Cooper): https://www.youtube.com/watch?v=EZ05e7EMOLM • BUILD STUFF'13: Ian Cooper - TDD, where did it all go wrong: https://www.youtube.com/watch?v=HNjlJpuA5kQ • Unit Test (Martin Fowler): https://martinfowler.com/bliki/UnitTest.html