# mock-server/mockserver

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/mock-server-mockserver).**

4,900 stars · 1,109 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/mock-server/mockserver
- Homepage: https://www.mock-server.com
- awesome-repositories: https://awesome-repositories.com/repository/mock-server-mockserver.md

## Description

Mockserver is a multi-protocol mock server and API verification proxy used to simulate HTTP, gRPC, and WebSocket endpoints. It functions as a tool for testing client applications without relying on live backend services, providing a system to simulate chat completions and streaming responses for large language model integrations.

The project automates behavior by generating request expectations and response behaviors from OpenAPI and Swagger specification files. It differentiates itself through a network traffic simulator that introduces latency, dropped connections, and failures to verify how applications handle unstable network dependencies.

The platform covers API contract testing and request pattern verification, using a matching engine to map incoming requests to predefined responses. It also includes capabilities for live traffic monitoring, recording, and modification to analyze data flow or replay traffic for debugging.

## Tags

### Testing & Quality Assurance

- [API Mocking](https://awesome-repositories.com/f/testing-quality-assurance/api-network-testing/api-mocking.md) — Provides a multi-protocol mock server to simulate HTTP, gRPC, and WebSocket endpoints for client testing.
- [OpenAPI Mock Generators](https://awesome-repositories.com/f/testing-quality-assurance/api-network-testing/api-mocking/openapi-mock-generators.md) — Automatically generates mock API responses and expectations from OpenAPI or Swagger specification files.
- [API Behavior Definitions](https://awesome-repositories.com/f/testing-quality-assurance/api-behavior-definitions.md) — Allows defining expected requests and corresponding responses for HTTP, gRPC, and WebSocket APIs. ([source](https://github.com/mock-server/mockserver#readme))
- [LLM Behavior Simulators](https://awesome-repositories.com/f/testing-quality-assurance/api-endpoint-testing/simulated-request-testing/llm-behavior-simulators.md) — Simulates chat completion interfaces and streaming responses to test large language model integrations. ([source](https://github.com/mock-server/mockserver#readme))
- [HTTP Mock Servers](https://awesome-repositories.com/f/testing-quality-assurance/http-mock-servers.md) — Simulates HTTP, gRPC, and WebSocket endpoints to test client applications without relying on live backend services.
- [Network Failure Simulations](https://awesome-repositories.com/f/testing-quality-assurance/network-resilience-simulators/response-simulators/network-failure-simulations.md) — Simulates network-level errors like timeouts and dropped connections to verify application resilience.
- [Scripted Mock Responses](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/network-api-mocking/api-response-modifiers/local-api-response-mocking/scripted-mock-responses.md) — Generates flexible, dynamic responses using scripts and templates to avoid static values during testing. ([source](https://github.com/mock-server/mockserver#readme))
- [Request Sequence Verification](https://awesome-repositories.com/f/testing-quality-assurance/http-request-clients/request-verification/request-sequence-verification.md) — Asserts that specific requests reached the server in the correct order and with the expected frequency. ([source](https://github.com/mock-server/mockserver#readme))
- [Stateful Request Tracking](https://awesome-repositories.com/f/testing-quality-assurance/http-request-clients/request-verification/stateful-request-tracking.md) — Tracks the sequence and frequency of incoming requests to validate the ordering of client-side API calls.

### Part of an Awesome List

- [AI and LLM Testing](https://awesome-repositories.com/f/awesome-lists/ai/ai-and-llm-testing.md) — Simulates AI chat completions and streaming responses to test LLM workflows without external providers.
- [Mocking Tools](https://awesome-repositories.com/f/awesome-lists/devtools/mocking-tools.md) — Solution for mocking HTTP/HTTPS services.

### Development Tools & Productivity

- [API Interception Proxies](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/cloud-service-emulation-interception/api-interception-proxies.md) — Intercepts and records live network traffic to verify request patterns and assert correct API call sequences.
- [OpenAPI Specification Imports](https://awesome-repositories.com/f/development-tools-productivity/openapi-configurations/documentation-generators/openapi-specification-generators/openapi-specification-imports.md) — Automatically generates request expectations and response behaviors from OpenAPI and Swagger specification files. ([source](https://github.com/mock-server/mockserver#readme))
- [OpenAPI Specification Parsers](https://awesome-repositories.com/f/development-tools-productivity/openapi-specification-parsers.md) — Parses OpenAPI specifications to translate them into automated request expectations and responses.

### Networking & Communication

- [Request Matching Engines](https://awesome-repositories.com/f/networking-communication/http-request-customization/custom-http-response-serving/http-response-stubbing/request-matching-engines.md) — Maps incoming network requests to predefined responses using metadata, body content, or header patterns.
- [API Response Simulators](https://awesome-repositories.com/f/networking-communication/network-traffic-processors/api-response-simulators.md) — Matches incoming requests on metadata or bodies to return configured responses across multiple protocols. ([source](https://github.com/mock-server/mockserver#readme))
- [LLM Response Simulators](https://awesome-repositories.com/f/networking-communication/network-traffic-processors/api-response-simulators/llm-response-simulators.md) — Provides a mocking interface for testing LLM integrations by simulating chat completion and streaming responses.
- [Real-Time Traffic Dashboards](https://awesome-repositories.com/f/networking-communication/http-traffic-inspection/real-time-traffic-dashboards.md) — Provides a real-time web dashboard to visualize incoming HTTP requests and server logs for live inspection. ([source](https://github.com/mock-server/mockserver#readme))
- [Traffic Recorders](https://awesome-repositories.com/f/networking-communication/http-traffic-inspection/traffic-recorders.md) — Captures and stores live HTTP traffic for subsequent analysis or playback in testing scenarios. ([source](https://github.com/mock-server/mockserver#readme))
- [Network Traffic Analyzers](https://awesome-repositories.com/f/networking-communication/network-traffic-analyzers.md) — Intercepts, records, and modifies live API requests and responses to analyze data flow and debug traffic.
- [Traffic Interceptors](https://awesome-repositories.com/f/networking-communication/traffic-interceptors.md) — Captures and alters live network packets between a client and a server to simulate network conditions.

### System Administration & Monitoring

- [Multi-Protocol Proxies](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/proxy-management-systems/multi-protocol-proxy-managers/multi-protocol-proxies.md) — Provides a proxy layer that handles communication across HTTP, gRPC, and WebSockets.
- [Traffic Interception and Modification](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/traffic-interception-modification.md) — Intercepts and actively alters live network requests and responses in transit to analyze or modify data. ([source](https://github.com/mock-server/mockserver#readme))

### Data & Databases

- [API Contract Validation](https://awesome-repositories.com/f/data-databases/json-schema-modeling/schema-validators/api-contract-validation.md) — Validates that clients correctly implement an OpenAPI specification by simulating expected request/response patterns.

### Web Development

- [Response Templating](https://awesome-repositories.com/f/web-development/request-body-handling/dynamic-body-templating/response-templating.md) — Produces dynamic content by interpolating variables or executing scripts within response bodies at runtime.
