awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
bblimke avatar

bblimke/webmock

0
View on GitHub↗
4,050 stars·577 forks·Ruby·MIT·5 vues

Webmock

WebMock est une bibliothèque Ruby pour le stubbing de requêtes HTTP, la simulation de réponses et l'interception réseau. Elle sert de framework d'assertion de test pour vérifier le trafic HTTP sortant et de couche d'interception réseau qui bloque les connexions externes pour éviter les requêtes accidentelles pendant les tests.

Le projet offre des capacités pour la génération de réponses dynamiques et le séquençage de différentes valeurs de retour pour des requêtes répétées vers le même endpoint. Il prend en charge la simulation de pannes réseau, telles que des timeouts ou des exceptions, et permet la relecture de réponses en utilisant des données HTTP brutes chargées à partir de fichiers locaux.

La bibliothèque couvre un large éventail de fonctions de simulation d'API et de contrôle réseau, notamment le matching de requêtes basé sur des URI et des en-têtes, l'enregistrement de signatures de requêtes et le filtrage du trafic sortant. Elle inclut également des utilitaires de surveillance pour intercepter et journaliser les événements réseau via des callbacks personnalisés.

Features

  • HTTP Stubbing Frameworks - Implements a comprehensive framework for stubbing HTTP requests and returning predefined status codes and bodies.
  • Ruby - Simulates HTTP server responses to isolate application logic from external network dependencies in Ruby projects.
  • Request Body Matchers - Validates request payloads using regular expressions, partial data structures, or custom logic blocks.
  • Application-Level Traffic Interception - Hooks into Ruby HTTP client libraries to divert outgoing traffic into a custom stub handler.
  • Request History Logs - Captures and stores a history of all intercepted requests to enable post-execution assertions.
  • Ruby HTTP Mocking Libraries - Provides utilities to intercept and simulate HTTP traffic within Ruby applications during testing.
  • API Expectation Frameworks - Provides tools to verify that specific API calls were made with the expected parameters and headers.
  • External API Call Assertions - Verifies that an application made expected outgoing HTTP requests to external services.
  • Custom Mock Response Overrides - Enables the configuration of custom status codes, headers, and bodies to override default mock responses.
  • Request Verification - Asserts that outgoing requests were made, skipped, or executed a specific number of times.
  • Network Connection Blockers - Blocks all external network connections by default to prevent accidental requests during testing.
  • Response Simulators - Generates custom status codes, artificial delays, and specific content types to test application resilience.
  • Network Failure Simulations - Provides simulations of network-level errors such as connection timeouts and service outages to verify application resilience.
  • Regex Request Matching - Allows matching API requests using regular expressions and flexible patterns in URIs and headers.
  • Network Request Assertions - Provides assertions for verifying that specific network requests were executed with expected parameters.
  • Network Request Filters - Uses regular expressions and custom logic to block or allow specific network requests based on URL patterns.
  • HTTP Client Interception - Intercepts outgoing network traffic to block external connections and prevent accidental requests during tests.
  • File-Based Response Serving - Serves the raw contents of local files as mock API response bodies.
  • Dynamic Response Callbacks - Provides custom callback functions to generate mock responses dynamically based on incoming request data.
  • Response Sequencing - Returns a sequence of different responses for repeated requests to the same endpoint.
  • Local API Response Mocking - Loads raw HTTP responses from local files to serve as stubbed return values.
  • Mock State Resetting - Includes utilities to reset request history and clear active stubs between individual test cases.
  • Network Connectivity Controls - Restricts or permits network access to specific hosts during test execution to ensure isolation.
  • Testing - HTTP request stubbing.

Historique des stars

Graphique de l'historique des stars pour bblimke/webmockGraphique de l'historique des stars pour bblimke/webmock

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Questions fréquentes

Que fait bblimke/webmock ?

WebMock est une bibliothèque Ruby pour le stubbing de requêtes HTTP, la simulation de réponses et l'interception réseau. Elle sert de framework d'assertion de test pour vérifier le trafic HTTP sortant et de couche d'interception réseau qui bloque les connexions externes pour éviter les requêtes accidentelles pendant les tests.

Quelles sont les fonctionnalités principales de bblimke/webmock ?

Les fonctionnalités principales de bblimke/webmock sont : HTTP Stubbing Frameworks, Ruby, Request Body Matchers, Application-Level Traffic Interception, Request History Logs, Ruby HTTP Mocking Libraries, API Expectation Frameworks, External API Call Assertions.

Quelles sont les alternatives open-source à bblimke/webmock ?

Les alternatives open-source à bblimke/webmock incluent : nock/nock — nock is a Node.js HTTP mocking library and request interceptor. It captures outgoing network traffic to specific hosts… getsentry/responses — Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to… mock-server/mockserver-monorepo — This project is a multi-protocol API simulation and mocking system designed to replace external dependencies during… alisoftware/ohhttpstubs — OHHTTPStubs is an HTTP network mocking library and request interceptor used to simulate server responses for testing… wheresrhys/fetch-mock — Fetch-mock is a testing utility designed to isolate application code from external network dependencies by… didi/mpx — MPX is a cross-platform framework designed to build applications for multiple mini-program ecosystems and the web from…

Alternatives open source à Webmock

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Webmock.
  • nock/nockAvatar de nock

    nock/nock

    13,103Voir sur GitHub↗

    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. The project functions as an API expectation framework to verify that specific calls were made with correct parameters. It includes a traffic recorder that captures real network interactions as fixtures for playback and a network simulation tool to introduce artificial latency or trigger network errors. Its capabilities cover request matching via hostnames, paths

    JavaScripthttpjavascriptmock
    Voir sur GitHub↗13,103
  • getsentry/responsesAvatar de getsentry

    getsentry/responses

    4,350Voir sur GitHub↗

    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

    Pythontag-production
    Voir sur GitHub↗4,350
  • mock-server/mockserver-monorepoM

    mock-server/mockserver-monorepo

    4,897Voir sur GitHub↗

    This project is a multi-protocol API simulation and mocking system designed to replace external dependencies during development and testing. It provides an API mocking server, a network traffic proxy, and specialized simulators for language model services and identity providers. The system distinguishes itself through deep AI simulation capabilities, including the emulation of language model providers and Model Context Protocol servers using JSON-RPC 2.0. It supports multi-turn conversational logic, state tracking for AI chat APIs, and the visualization of agent execution through call graphs

    Java
    Voir sur GitHub↗4,897
  • alisoftware/ohhttpstubsAvatar de AliSoftware

    AliSoftware/OHHTTPStubs

    5,068Voir sur GitHub↗

    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

    Objective-Ciosmockmock-server
    Voir sur GitHub↗5,068
  • Voir les 30 alternatives à Webmock→