Skip to content
Scriptable, multipurpose mock server.
Java Groovy HTML Shell Other
Branch: master
Clone or download
Latest commit 9416f2a Aug 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Release 0.7.0. Aug 3, 2019
api Makes safer assumptions about the current Vert.x context. Feb 24, 2019
core Makes safer assumptions about the current Vert.x context. Feb 24, 2019
distro Moves core API into Maven-published 'api' module. Feb 17, 2019
docker Switches to CircleCI. Dec 18, 2017
docs Merge branch 'develop' Aug 3, 2019
gradle/wrapper Bumps Gradle version. Feb 17, 2019
plugin Makes safer assumptions about the current Vert.x context. Feb 24, 2019
scripts Release 0.7.0. Aug 3, 2019
server
test Verticle startup no longer blocks the main thread. Feb 24, 2019
.dockerignore Switches to CircleCI. Dec 18, 2017
.gitignore
CHANGELOG.md Release 0.7.0. Aug 3, 2019
README.md Switches to CircleCI. Dec 18, 2017
build.gradle Release 0.7.0. Aug 3, 2019
gradlew Bumps various dependency versions. Oct 14, 2017
gradlew.bat Bumps various dependency versions. Oct 14, 2017
settings.gradle Moves core API into Maven-published 'api' module. Feb 17, 2019

README.md

Imposter: A scriptable, multipurpose mock server CircleCI

Reliable, scriptable and extensible mock server for general REST APIs, OpenAPI (aka Swagger) specifications, Salesforce and HBase APIs.

Scripting support for both JavaScript or Groovy/Java.

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

Provide mock responses using static files or customise behaviour using JavaScript or Java/Groovy. Power users can write their own plugins in a JVM language of their choice.

Getting started

The quickest way to get up and running is to use our free cloud-hosted version at https://www.remotebot.io/mocks


Documentation

Read the documentation here.


Plugins

Imposter uses plugins to control its behaviour and provide specialised mocks:

You can also create your own plugins, using a JVM language of your choice.

Example

Let's assume your configuration is in a folder named config.

Docker example:

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 inside the config folder. You can hit the URL http://localhost:8443/example to see the mock response.

Recent changes and Roadmap

For recent changes see the Changelog, or view the Roadmap.

Contributing

  • Pull requests are welcome.
  • PRs should target the develop branch.

Author

Pete Cornish (outofcoffee@gmail.com)

You can’t perform that action at this time.