Topic hub
Testing
Unit, integration and E2E tests, test doubles, flaky tests, contract and property-based testing.
Lessons
- Dependency Overrides in Tests · FastAPI: From Basics to Production
Swap auth, settings and external services in tests. - Evaluating LLM Features · Integrating LLM APIs
Golden datasets, graders and regression tests for prompts and models. - Testing Distributed Systems · Distributed Systems for Backend Engineers
Fault injection, Jepsen-style tests and deterministic simulation. - Testing Event-Sourced Systems · Event Sourcing & CQRS
Given-when-then tests for aggregates and projections. - Contract Testing: Pact and Schema-Based Testing · API Platform & Lifecycle
Verify providers and consumers agree without full end-to-end environments. - Testing Real-Time Systems · Real-Time APIs
Unit, integration, load and chaos tests for persistent connections. - Chaos Engineering · Resilience Patterns
Inject failures deliberately to find weaknesses first. - Load, Stress and Soak Testing · Resilience Patterns
Know your limits and how the system behaves past them. - Characterization Tests · PHP 7: Maintaining and Upgrading Legacy Apps
Capture what the code does today before you change it. - Unit Testing with PHPUnit · PHP 8: Modern PHP Development
Write fast, focused tests with PHPUnit 11 attributes and data providers. - Component Tests with Vitest and Testing Library · React: From Components to Production
Test components the way users use them. - Testing Async UI with MSW · React: From Components to Production
Mock the network instead of modules for realistic data-fetching tests. - Repository Tests with Testcontainers · Spring Boot: From Basics to Production
Test queries against a real PostgreSQL in Docker.
Cookbook recipes
- Test FastAPI endpoints against a real database · FastAPI
- Test a Next.js app with Vitest and Playwright · Next.js
- Test an Express API with node:test and supertest · Node.js
- Wire a PHP app with a DI container · PHP
- Test database code in PHP with transactions · PHP
- Test a data-fetching component with MSW · React
- Test external API integrations with WireMock · Spring Boot