Home

MockServer

MockServer is an open-source tool for mocking and proxying HTTP and HTTPS services, enabling teams to simulate external systems for testing, development, and CI pipelines. It can run as a standalone server, be embedded in tests, or operate inside containers, such as Docker, to fit into existing workflows.

The core functionality centers on defining expectations that map incoming requests to predefined responses. Users can

Typical use cases include isolating test environments from fragile or unavailable external services, validating client-side error

MockServer is released under an open-source license and has an active community contributing features and integrations.

specify
matchers
based
on
method,
path,
headers,
or
body,
and
return
custom
status
codes,
headers,
and
bodies.
MockServer
also
supports
request
verification
to
confirm
that
expected
requests
occurred,
as
well
as
scenario-based
workflows
to
model
multi-step
interactions.
In
proxy
mode,
it
can
forward
unmatched
traffic
to
real
endpoints
and
can
record
interactions
for
later
replay.
Features
such
as
response
templating,
delay
injection,
and
fault
simulation
help
simulate
realistic
service
behavior
and
latency.
handling,
and
driving
end-to-end
tests
with
stable
responses.
It
is
commonly
employed
in
integration
and
contract
testing,
performance
testing,
and
automated
test
suites.
The
tool
provides
a
REST
API
and
client
libraries
(notably
Java
and
JavaScript)
to
programmatically
define
and
manage
mocks.
It
also
offers
a
command-line
interface
and
a
Docker
image,
making
it
easy
to
integrate
into
build
pipelines.
It
is
often
compared
with
other
API
mocking
tools
and
complements
testing
ecosystems
by
providing
reliable,
configurable
service
virtualization.