Application Infrastructure

“Testing Without Mocks” Training

May
28
2024

I’m offering in-person training for this material at Craft Conference in Budapest on May 28 and 29th. Register here.

To be notified about future “Testing Without Mocks” training courses, join the mailing list here (requires Google login).

For private training, contact me directly.

Each week in my Tuesday Lunch & Learn livestream, we look at a useful technical skill, define a challenge related to that skill, and solve the challenge live. This week, it's isolating and testing application infrastructure.

Application infrastructure is all the external systems your application interacts with: networks and services; file systems and databases; and global state such as the computer's clock and your application’s process. Without it, your code is a black box. But it’s complicated and difficult to test.

Our challenge this week: build a simple command-line application—and do so in a way that manages the command-line infrastructure well. We need to isolate application from our infrastructure decisions and we need to make sure our infrastructure is tested.

To follow along, download the code from GitHub and check out the 2020-05-12 tag. To see the final result, check out the 2020-05-12-end tag or view it on GitHub.

Visit the Lunch & Learn archive for more.

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