May
28
2024
“Testing Without Mocks” Training (Budapest, Hungary)

I’m delivering my “Testing Without Mocks” training course at the Craft Conference in Budapest, Hungary on May 28th and 29th. Buy tickets here.

Course Description

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.

Prerequisites

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)

Bring a laptop with Node.js and a code editor installed. You will receive a link to the course's git respository and installation instructions prior to the start of the course.

Buy tickets here.

If you liked this entry, check out my best writing and presentations, and consider subscribing to updates by email or RSS.