network mocking

Intercepting a test’s outgoing network requests and answering them with fixed fake responses.

In more detail

Mocking slow or unreliable third-party services, such as a payment gateway, makes tests fast and deterministic. Keep your own backend real in end-to-end tests so they still test the integration.

Related terms

Taught in

References