{"schemaVersion":"1.0","record":{"label":"MockServer","description":"Programmable service mocks, proxy recordings and fault injection for trusted test environments.","aliases":[],"kind":"software","website":"https://www.mock-server.com/","overview":"MockServer is an Apache-2.0 mock server and proxy for isolating service dependencies during development and testing. It matches requests to configured expectations, can record upstream interactions and supports controlled delays or failures for testing client behavior.","license":"Apache-2.0","lifecycle":"active","example":false,"features":[{"name":"Programmable mocks","status":"supported","detail":"Request matchers choose authored, templated or callback responses.","useCase":"Programmatic service dependency testing","platforms":["Java 17+","Docker","Kubernetes"],"region":"Version, runtime and trusted development/test environment requirements apply.","evidence":[{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/README.md","locator":"Request matching, fault injection, distribution and Java requirements","retrievedAt":"2026-10-07T11:09:23Z","kind":"vendor"}]},{"name":"Recorded expectation persistence","status":"limited","detail":"Recorded and authored expectations have separate persistence and initialization settings.","useCase":"Programmatic service dependency testing","platforms":["Java 17+","Docker","Kubernetes"],"region":"Version, runtime and trusted development/test environment requirements apply.","evidence":[{"url":"https://www.mock-server.com/mock_server/persisting_expectations.html","locator":"Separate persistence controls for authored and recorded expectations","retrievedAt":"2026-10-07T11:08:28Z","kind":"vendor"}]},{"name":"Untrusted public deployment","status":"unsupported","detail":"Project security policy restricts use to trusted development/test environments.","useCase":"Programmatic service dependency testing","platforms":["Java 17+","Docker","Kubernetes"],"region":"Version, runtime and trusted development/test environment requirements apply.","evidence":[{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/SECURITY.md","locator":"Development/testing-only posture and trusted environment assumptions","retrievedAt":"2026-10-07T11:09:34Z","kind":"vendor"}]}],"alternatives":[],"slug":"mockserver","draftAlternatives":[{"targetSlug":"wiremock","status":"limited","detail":"Can replace programmable HTTP mocks and record/replay fixtures; expectations, persistence and matching behavior require migration.","useCase":"Programmatic service dependency testing","platforms":["Java 17+","Docker","Kubernetes"],"region":"Version, runtime and trusted development/test environment requirements apply.","evidence":[{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/README.md","locator":"Request matching, fault injection, distribution and Java requirements","retrievedAt":"2026-10-07T11:09:23Z","kind":"vendor"},{"url":"https://www.mock-server.com/proxy/record_and_replay.html","locator":"Plain retrieval versus recordings/promote: consolidation, parameterization and redaction defaults; checked 2026-10-14.","retrievedAt":"2026-10-14T04:23:47Z","kind":"vendor"},{"url":"https://wiremock.org/docs/standalone/","locator":"Java/JSON configuration and JAR/container distribution","retrievedAt":"2026-10-07T11:08:23Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/README.md","locator":"Request matching, fault injection, distribution and Java requirements","retrievedAt":"2026-10-07T11:09:23Z","kind":"vendor"},{"url":"https://www.mock-server.com/proxy/record_and_replay.html","locator":"Plain retrieval versus recordings/promote: consolidation, parameterization and redaction defaults; checked 2026-10-14.","retrievedAt":"2026-10-14T04:23:47Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/LICENSE.md","locator":"Apache License 2.0","retrievedAt":"2026-10-07T11:09:34Z","id":"mockserver-license","title":"MockServer license","kind":"vendor"},{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/README.md","locator":"Request matching, fault injection, distribution and Java requirements","retrievedAt":"2026-10-07T11:09:23Z","id":"mockserver-readme","title":"MockServer repository","kind":"vendor"},{"url":"https://www.mock-server.com/proxy/record_and_replay.html","locator":"Plain retrieval versus recordings/promote: consolidation, parameterization and redaction defaults; checked 2026-10-14.","retrievedAt":"2026-10-14T04:23:47Z","id":"mockserver-record","title":"MockServer record and replay","kind":"vendor"},{"url":"https://www.mock-server.com/mock_server/persisting_expectations.html","locator":"Separate persistence controls for authored and recorded expectations","retrievedAt":"2026-10-07T11:08:28Z","id":"mockserver-persist","title":"Persisting MockServer expectations","kind":"vendor"},{"url":"https://github.com/mock-server/mockserver-monorepo/blob/master/SECURITY.md","locator":"Development/testing-only posture and trusted environment assumptions","retrievedAt":"2026-10-07T11:09:34Z","id":"mockserver-security","title":"MockServer security policy","kind":"vendor"},{"url":"https://wiremock.org/docs/standalone/","locator":"Java/JSON configuration and JAR/container distribution","retrievedAt":"2026-10-07T11:08:23Z","id":"wiremock-standalone","title":"WireMock standalone service","kind":"vendor"},{"url":"https://wiremock.org/docs/record-playback/","locator":"Recording and snapshotting stub mappings","retrievedAt":"2026-10-07T11:08:23Z","id":"wiremock-record","title":"WireMock record and playback","kind":"vendor"}],"overviewCitations":["mockserver-readme"],"licenseCitations":["mockserver-license"],"sections":[{"id":"expectations","heading":"Programmable expectations","paragraphs":[{"id":"expectations-detail","content":[{"text":"Expectations connect request conditions with canned, templated or callback-based responses. Matching can inspect methods, paths, headers, cookies and bodies, including structured JSON and XML criteria. Client libraries and an HTTP control interface let a test suite configure behavior programmatically. The current project also documents a dashboard, several deployment formats and fault injection; these capabilities serve controlled test environments rather than a production application backend."}],"citations":["mockserver-readme"]}]},{"id":"recording","heading":"Capturing dependencies","paragraphs":[{"id":"recording-detail","content":[{"text":"Proxy traffic can be retrieved as editable recorded expectations, including JSON or Java representations. This lets a team turn observed interactions into fixtures and adjust them when the API changes. Plain retrieval leaves recorded output unchanged unless generalization or consolidation options are enabled. The recordings/promote endpoint follows different defaults: it consolidates, parameterizes and redacts credentials by default before activating the mocks. Matching still needs checking against the intended requests; neither workflow guarantees that every future identifier or timestamp will match."}],"citations":["mockserver-record"]}]},{"id":"persistence","heading":"Saving fixtures between runs","paragraphs":[{"id":"persistence-detail","content":[{"text":"Authored expectations and recorded proxy expectations have separate persistence controls and can be saved to different files. Replaying a saved recording after restart requires loading the corresponding file as initialization data. Recording traffic, persisting it and restoring a mock are thus distinct steps. A test setup should make the intended fixture source explicit rather than assuming all state survives a process restart."}],"citations":["mockserver-persist"]}]},{"id":"deployment","heading":"Runtime and trust boundary","paragraphs":[{"id":"deployment-detail","content":[{"text":"MockServer's current repository specifies Java 17 or newer for the runtime, while the official container includes its own JVM. The source is Apache-2.0 licensed. Its security policy explicitly limits intended use to development, testing and QA, with trusted users, expectations and networks; it advises against production deployment or exposure to untrusted networks. These constraints matter when choosing a shared test server."}],"citations":["mockserver-readme","mockserver-license","mockserver-security"]}]},{"id":"fit","heading":"Substitution scope","paragraphs":[{"id":"fit-detail","content":[{"text":"MockServer can substitute for "},{"text":"WireMock","targetSlug":"wiremock"},{"text":" for programmable HTTP dependency simulation and proxy-derived fixtures. Both can decouple a test from live upstream responses, but use different configuration and recording models. This is not a claim of compatible mapping files or identical matching precedence. Teams should translate expectations, verify persistence and reset behavior, and isolate the service according to its documented trust assumptions before relying on migrated tests."}],"citations":["mockserver-readme","mockserver-record","mockserver-security","wiremock-standalone","wiremock-record"]}]}]},"id":"Q1683","revision":1796,"updatedAt":"2026-10-26T06:45:50Z","sourceUrl":"https://substitutefor.net/entities/Q1683?revision=1796"}}