Workshop details

2024. May 28. - May 29., 9:00-17:00
Testing Without Mocks
Software Delivery Craft Matters
unit tests
integration tests
Level: Intermediate+

Programmers need automated tests to avoid wasting huge amounts of time manually checking and fixing code. But automated tests also tend to waste a huge amount of time:

  • Flaky tests fail randomly.

  • End-to-end tests run slowly.

  • Mock-heavy tests can be hard to understand, lock in implementation, or only test themselves.

People use design techniques such as Hexagonal Architecture to reduce these problems, but they require expensive architectural changes and often leave infrastructure untested. (Infrastructure is the code that talks to external systems or state.)

In this hands-on coding course, I’ll show you another way. You'll learn how to write tests that are fast, reliable, fully test infrastructure, and don't require architectural changes. Better yet, they're 100% compatible with your existing code and tests. You can start using them immediately, even in a legacy codebase.

Learn how to:

  • Write narrow tests that are fast and reliable.

  • Write sociable tests that ensure your whole system works together.

  • Use state-based tests so you can refactor code without breaking tests.

  • Factor out helper methods that make your tests easy to read and resilient to changes.

  • Use Nullables to easily test application code that depends on infrastructure.

  • Design and implement Nullables of your own.

  • Use low-level Nullables to easily test high-level infrastructure wrappers.

  • Design and implement reusable low-level infrastructure wrappers.

  • Use narrow integration tests to test low-level infrastructure.

All this while building and testing a web page controller and the infrastructure that connects it to an external service.


This is a course for experienced developers. You’ll need to be familiar with:

  • JavaScript or TypeScript

  • Unit testing tools (see this video for an introduction)

Craft 2024 - James Shore
James Shore
Vice President of Engineering at OpenSesame

James Shore leads organizations in scaling software development, most recently for OpenSesame, where he is Vice President of Engineering. He is the author of the Agile how-to guide, The Art of Agile Development, co-creator of the Agile Fluency® Model, and a recipient of the Agile Alliance’s Gordon Pask Award for Contributions to Agile Practice. His writing and screencasts may be found online at ja...