What it does
MockServer is a self-hostable HTTP(S) mock server and proxy for replacing or observing network dependencies during development and testing. A team defines request expectations and response actions, runs its own test scenarios against the mock, and can verify which requests arrived. It provides a REST control plane and client libraries, with options such as Docker, a JAR, Node, and Kubernetes deployments. This is a test dependency to run in the project's environment, not a managed testing service that supplies the application or its assertions.
Replace a service boundary with a predictable response
A useful first scenario is testing code that calls a payment, shipping, or profile API without contacting the real service. The official quick start starts MockServer, defines an expectation such as GET /hello returning a chosen status and body, runs the application's test scenario, and verifies the received request. The server's REST control plane and client libraries can set expectations from tests, while the documentation also describes matching headers, query values, and bodies.
The deployment choice depends on the project's environment: the official guide offers a Docker image, Node launcher, Homebrew command, and JVM-based options. Docker bundles its own Java runtime; running the JAR directly requires Java 17 or newer. A test suite can start and stop a server with its container, or reuse a centralized instance and reset expectations between tests.
MockServer is Apache-licensed software intended for development and testing. You still need to write the assertions that express your application's expected behavior; a mock only controls the dependency boundary and records what reaches it. The sources accessed here did not establish a priced hosted edition.
Strengths
- Request expectations can match HTTP methods, paths, headers, query parameters, and bodies, then return controlled responses.
- The documented REST control plane and client libraries let tests configure mocks and verify requests programmatically.
- Docker, Node, JVM, and Kubernetes deployment options fit different local and CI setups.
Watch out for
- The test team must run and configure the mock server and supply the application scenarios and assertions itself.
Best for
- Integration tests that need stable responses from remote HTTP dependencies
- Testing request construction, error handling, or multi-step API behavior without calling production services
Sources
- MockServer (Oct 26, 2026)
- MockServer repository README (Oct 26, 2026)
- Getting Started Mocking | MockServer (Oct 26, 2026)
- Apache License, Version 2.0 (Oct 26, 2026)
