Service Virtualisation
// Definition
Simulating the behaviour of dependent services — including timing, errors, and stateful protocols — that aren't available, are too costly to call, or are still being built. Broader than API mocking: covers protocols beyond HTTP and stateful interactions.
// Related terms
API Mocking
Replacing a real API with a controlled stand-in that returns scripted responses. Lets you test client behaviour against edge cases (5xx, slow responses, malformed payloads) that the real API rarely produces on demand.
Mock
A test double that records how it was called and lets the test assert on those interactions. Pre-programmed with expectations about which methods will be called and how.
Test Doubles
Umbrella term for any object that stands in for a real dependency in a test. Includes dummies, fakes, stubs, spies, and mocks — each with distinct semantics.
Learn more · API Testing Masterclass
Chapter 8 · Lesson 3: Mocking and Virtualisation