July
20
2022
Nullable Infrastructure (Nashville, TN)

I’m giving a hands-on coding workshop at the Agile 2022 conference in Nashville, Tennessee on Wednesday, July 20th.

Agile 2022 is the premier Agile conference. It’s a huge event drawing speakers and attendees from all over the world, and it runs from July 18th through July 22nd. Wednesday afternoon is dedicated to longer workshops, and my workshop is about nullable infrastructure.

Nullable Infrastructure: A Drop-In Replacement for Mocks

If you're familiar with unit testing, you're probably also familiar with the brittleness and excessive boilerplate that often results from overuse of mock objects and other test doubles. They're a great tool, sure, but they also make tests hard to read and code hard to refactor. Luckily, there's another way to do it: nullable infrastructure.

Nullable infrastructure is part of James Shore's “Testing Without Mocks” pattern language. It's a drop-in replacement for normal test doubles that allows you to move from isolated interaction-based tests to sociable state-based tests. The end result is tests that are fast, reliable, and low-maintenance.

In this hands-on workshop, we'll use a simple Node.js microservice client to demonstrate how nullable infrastructure works. We'll start with traditional mock-based tests and modify them to use nullable infrastructure instead. Then we'll explore how to create your own nullable infrastructure from scratch. Along the way, you'll learn the tradeoffs involved and come to your own conclusions about when to use mocks and when to use nullable infrastructure.

This is a highly technical workshop intended for programmers. Be sure to read the following prerequisites and come prepared to code!

Prerequisites and Advance Setup

This is a hands-on coding workshop. You'll be programming in JavaScript and Node.js and running commands from the command-line. Prior experience with unit tests and mock objects is highly recommended. Familiarity with JavaScript, Node.js, Mocha, Chai, command-line basics, and microservice basics is also recommended.

Please bring a laptop prepared in advance with the following:

  1. Install Node.js
  2. Install Git
  3. Install your favorite JavaScript code editor
  4. Clone the example repository:
    git clone https://github.com/jamesshore/agile-2022.git
    (Note: this repo will not be available until the conference begins.)
  5. Read the README and run the build

The workshop will be on Wednesday from 2-5pm in Lincoln CDE. Find more information and register here.

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