Skip to content
SPECIFICTION
Get listed

MockServer vs MockWebServer

MockServer

mock-server.com

MockWebServer

square.github.io

Side by side

FigureMockServerMockWebServer
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
WindowsYes—
macOSYes—
LinuxYes—
Android—Yes
APIYes—
Self-hostedYes—
Plans published12
Spec score · API Mocking Tools8.0 (#10)7.7 (#14)
PurposeMockServer mocks and proxies HTTP, HTTPS and gRPC services for fast, isolated and deterministic testing.MockWebServer is a library for testing HTTP, HTTPS, and HTTP/2 clients.

Plans

MockServer

  • Free and open-sourceFree

MockServer pricing →

MockWebServer

  • MockWebServerFree
  • Open sourceFree

MockWebServer pricing →

In their own words

MockServer

MockServer is a free, self-hosted tool for mocking and proxying HTTP, HTTPS, and gRPC services during isolated testing. It can verify requests as well as stand in for services. Teams can generate mocks and validate traffic against OpenAPI or Swagger contracts, or import recorded sessions from browser HAR files and Postman collections. Beyond HTTP services, it can mock gRPC, AsyncAPI brokers such as Kafka, MQTT, and AMQP, and OAuth2/OIDC providers. Its protocol coverage includes HTTP/1.1, HTTP/2, HTTPS, SOCKS, and experimental HTTP/3, which uses a separate UDP port. For fault-oriented testing, it can add latency, errors, dropped connections, and malformed responses to mocked or proxied traffic. Deployment options include Docker, an executable JAR, Helm/Kubernetes, Testcontainers, Homebrew, and a JVM-less bundle. A web dashboard displays logs, expectations, and recorded traffic; Prometheus metrics and OpenTelemetry tracing are available for shared environments. Each instance includes an MCP server at /mockserver/mcp. The /mockserver/status and /mockserver/ready probes remain reachable without authentication or authorization.

Visit mock-server.com

MockWebServer

MockWebServer is a free, open-source Android test library for developers checking HTTP clients. It provides a scriptable local server where tests supply canned responses and inspect requests made during HTTP, HTTPS, or HTTP/2 calls. Recorded requests expose method, path, HTTP version, body, headers, and chunk sizes for verification. Responses can be queued in sequence or generated by a Dispatcher that applies a request-by-request policy. Tests can throttle responses to imitate slow networks, and socket policies can keep connections open, disconnect during request or response bodies, or send no response. The README includes Java and Kotlin examples. The documented dependency is com.squareup.okhttp3:mockwebserver3:5.5.0, available through Maven Central. MockWebServer is licensed under Apache License 2.0 and is intended for internal and basic testing of apps using OkHttp. The project says it is not a full-featured standalone HTTP testing library and is not actively developed for new features; it suggests MockServer when requirements exceed its scope.

Visit square.github.io