Mock
also: mocks, mocked, mocking, mock object
A fake stand-in a test uses in place of a real part, like a pretend payment service, so the test runs fast and doesn't touch the real thing.
A test double that replaces a real dependency, such as an API client, database or clock, with a controlled fake. Mocks return preset answers and can record how they were called. They isolate your code, but they only behave the way you told them to.
A flight simulator. Pilots practice safely without a real plane. But if the simulator handles differently from the real plane, the practice proves less than it seems.
Mocks are useful, but agents sometimes mock away the very thing that's broken. A test that fakes the database can't catch a database bug. When a test passes, ask what was real and what was faked.
I mocked the Stripe client so the tests don't make real network calls. The mock returns a successful payment for every request.
Mock the external weather API in the unit tests, but keep one integration test that uses our real test database. List everything you mocked.
Confusing a mock with a fixture. A mock fakes a part of the system; a fixture is prepared starting data or setup, like three sample users.