Mock server for REST APIs, OpenAPI (and Swagger) specifications, SOAP web services (and WSDL files), Salesforce and HBase APIs.
- Run standalone mock servers in Docker, Kubernetes, AWS Lambda or on the JVM.
- Embed mocks within your tests (JVM or Node.js) to remove external dependencies.
- Script dynamic responses using JavaScript, Groovy or Java.
- Capture data from requests, then store it or return a templated response.
- Proxy an existing endpoint to replay its responses as a mock.
Send dynamic responses:
The quickest way to get up and running is to use the free cloud-hosted service at mocks.cloud
Read the user documentation here
Imposter provides specialised mocks for the following scenarios:
These use a plugin system, so you can also create your own plugins, using any JVM language.
$ imposter up
Starting server on port 8080...
Parsing configuration file: someapi-config.yaml
...
Mock server is up and running
Your mock server is now running! Here Imposter provides HTTP responses to simulate an API that accepts users and returns a dynamic response containing the user ID from the request.
$ curl -v -X PUT http://localhost:8080/users/alice
HTTP/1.1 201 Created
Content-Type: application/json
{ "userName": "alice" }
This is a trivial example, which you can extend with conditional logic, request validation, data capture and much more...
There are many ways to run Imposter.
For recent changes see the Changelog, or view the Roadmap.
develop
branch.Pete Cornish (outofcoffee@gmail.com)