nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts and paths, returning predefined responses to decouple applications from external servers during automated testing.
Die Hauptfunktionen von nock/nock sind: Network Request Interceptors, HTTP Mocking, Request Matching, Request Matchers, API Response Simulators, HTTP Mocking Libraries, API Expectation Frameworks, API Integration Testing.
Open-Source-Alternativen zu nock/nock sind unter anderem: pgte/nock — Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It… alisoftware/ohhttpstubs — OHHTTPStubs is an HTTP network mocking library and request interceptor used to simulate server responses for testing… getsentry/responses — Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to… bblimke/webmock — WebMock is a Ruby library for HTTP request stubbing, response simulation, and network interception. It serves as a… netflix/pollyjs — Pollyjs is an HTTP mocking and recording library designed to capture and replay network interactions to create… wheresrhys/fetch-mock — Fetch-mock is a testing utility designed to isolate application code from external network dependencies by…
Nock is a Node.js HTTP mocking library used to intercept outgoing network requests and return predefined responses. It functions as a network request interceptor and HTTP mock server, allowing developers to simulate external API behavior for automated testing without making live network calls. The project includes an API fixture recorder to capture real network interactions and save them as reusable data files for playback. It also features a network latency simulator that introduces artificial delays to outgoing HTTP responses to verify timeout handling and race conditions. The library prov
OHHTTPStubs is an HTTP network mocking library and request interceptor used to simulate server responses for testing application behavior without a live backend. It functions as a network request stubbing tool that captures outgoing network calls and replaces them with predefined mock data, custom status codes, and headers. The library distinguishes itself through its ability to simulate a wide range of network conditions, including artificial latency and connection failures. It supports dynamic response sequencing, allowing the tool to return a series of different responses for the same requ
Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to return predefined simulated responses. It functions as a request verification framework and a network simulation tool, allowing for the verification of application behavior against various API response patterns without making real network calls. The project distinguishes itself through a traffic recorder that captures real network interactions and saves them to files for deterministic replay. It further enables the simulation of complex network scenarios, including the triggering
WebMock is a Ruby library for HTTP request stubbing, response simulation, and network interception. It serves as a test assertion framework for verifying outgoing HTTP traffic and a network interception layer that blocks external connections to prevent accidental requests during testing. The project provides capabilities for dynamic response generation and the sequencing of different return values for repeated requests to the same endpoint. It supports simulating network failures, such as timeouts or exceptions, and allows for response replays using raw HTTP data loaded from local files. The