Giter VIP home page Giter VIP logo

imposter's Introduction

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 ([email protected])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.