Repo of the Day
castlemock/castlemock
Published: Dec 19, 2022
Open repository ↗Castle Mock is a web application that provides the functionality to mock out RESTful APIs and SOAP web services.
Summary
Castle Mock is a Java web application that mocks RESTful APIs and SOAP web services, with the ability to auto-generate mocks from WSDL, WADL, Swagger, and RAML definition files. The repository is archived: the README states Castle Mock is no longer maintained and the Docker Hub image will be deprecated and eventually deleted, so the README recommends exploring alternatives for active use. It is released under the Apache 2.0 license and runs on Apache Tomcat.
What it is useful for
The README positions Castle Mock for system and integration testing when client developers need to mimic server behavior or shape responses themselves. It can import WSDL, WADL, Swagger, or RAML files to auto-generate mock endpoints, and engineers can also create REST and SOAP resources manually in the UI. Each resource supports response strategies such as random and sequence, and a mock can be configured to forward requests to the original endpoint and record the response for later replay. The README explicitly limits the intended scope to testing on an internal network and is clear that it is not designed for anything other than testing purposes, which engineers should factor into any adoption decision.
How engineers can use it
The README documents a default local Tomcat deployment reachable at http://localhost:8080/castlemock, with default credentials admin / admin that the README recommends changing before further use. After logging in, you create a SOAP or REST project, either by hand or by importing a WSDL or WADL definition, and then mock or forward the resulting resources. A Docker image is published on Docker Hub under castlemock/castlemock and docker is listed as a repository topic, but the README does not include a docker run command or compose example, so the exact container invocation is not documented in the supplied source. The GitHub Wiki is referenced as the documentation source for fuller guidance. Given the deprecation notice, the README recommends alternatives for active use and warns the Docker image will be removed eventually; engineers picking this up for new work should plan around that constraint, and the unmaintained status is the main documented limitation to weigh before committing to it.