Tag: mocking
Browse 9 practical software engineering resources tagged with "mocking". Discover code recipes, design patterns, documentation templates, and in-depth guides to help you build, deploy, and maintain production-ready solutions involving mocking. Each resource is written for engineers who ship real systems, with copy-paste examples and practical trade-offs.
Mocking and Test Doubles
Mocking replaces real dependencies with controlled substitutes during tests. It helps isolate units, simulate failures, and speed up test execution.
The resources below cover mocks, stubs, fakes, spies, dependency injection, and mock servers. Each guide shows how to test components in isolation without hitting real services.
Every resource includes clear explanations, copy-paste code, and practical warnings. Use them to make informed decisions, avoid production pitfalls, and speed up your delivery. If you are just getting started, read the beginner-friendly articles first; if you are experienced, jump straight to the advanced patterns and architecture guides. New resources are added regularly, so bookmark this page and check back for the latest patterns.
Mock GraphQL Resolvers for Frontend Development
Set up mocked GraphQL resolvers with Apollo Server so frontend teams can develop against a fake API...
API Mocking for Testing
Build reliable tests by mocking external APIs with WireMock, MockServer, and MSW to eliminate...
Stub External HTTP APIs with WireMock in Java
Use WireMock in Java tests to stub external HTTP services. Covers response templating, delay...
Mock Network Requests with MSW
How to use Mock Service Worker (MSW) to intercept network requests in JavaScript tests and...
Mock External APIs with responses Library
How to mock HTTP API calls in Python tests using the responses library, including status codes,...
Write Unit Tests with Mocks and Stubs
How to isolate code under test using mock objects, stubs, and spies to replace external...
Test Double: Replace Dependencies with Stubs, Spies, Fakes
How to use test doubles to isolate units under test. Covers stubs, spies, fakes, mocks, and dummy...
Vitest for React: Component, Hook, and Integration Testing
Master Vitest for React testing: component tests with Testing Library, hook tests with renderHook,...
Software Testing Strategy Guide
A practical guide to building a layered testing strategy with unit, integration, and end-to-end...