Reliable, scriptable and extensible mock server for general REST APIs, OpenAPI (aka Swagger) specifications, Salesforce and HBase APIs.
What's it for?
Use Imposter to:
- run standalone mocks in place of real systems
- turn a Swagger file into a mock API for testing or QA
- quickly set up a temporary API for your mobile/web client teams whilst the real API is being built
- decouple your integration tests from the cloud/various back-end systems and take control of your dependencies
The quickest way to get up and running is to use our free cloud-hosted version at https://www.remotebot.io/mocks
Imposter uses plugins to control its behaviour and provide specialised mocks:
- REST - Mocks RESTful or plain HTTP APIs.
- OpenAPI (aka Swagger) - Support for OpenAPI (aka Swagger) API specifications.
- HBase - Basic HBase mock implementation.
- SFDC (Salesforce) plugin - Basic Salesforce mock implementation.
You can also create your own plugins, using a JVM language of your choice.
Let's assume your configuration is in a folder named
docker run -ti -p 8443:8443 \ -v $(pwd)/config:/opt/imposter/config \ outofcoffee/imposter-rest
Standalone Java example:
java -jar distro/build/libs/imposter.jar \ --plugin com.gatehill.imposter.plugin.rest.RestPluginImpl \ --configDir ./config
Your mock server is now running!
This example starts a mock server using the simple
REST plugin, serving responses based on the configuration files
config folder. You can hit the URL
http://localhost:8443/example to see the mock response.
Recent changes and Roadmap
- Pull requests are welcome.
- PRs should target the
Pete Cornish (email@example.com)