Git Product home page Git Product logo

mountepy's Introduction

mountepy

Build Status Coverage Status Requirements Status

Utilities for creating (micro)service tests. Based on Mountebank.

  • Test-framework-agnostic (use unittest, nose, py.test or whatever... but I like py.test).
  • Enables fast and reliable end-to-end testing of microservices. They won't be aware that they are in some testing mode.
  • Tested on Python 3.4, Ubuntu 14 x64.
  • Planned features in the road map below (this is still under development).

Installation

  1. Install NodeJS and NPM. On Ubuntu it's sudo apt-get install -y nodejs-legacy npm
  2. Install Mountebank npm install -g mountebank --production
  3. pip3 install git+git://github.com/butla/mountepy.git

If you want to lock on a specific version in requirements.txt then add to it a line pointing to a specific commit, e.g.:

git+git://github.com/butla/mountepy.git@456f22c

Testing

Install and run tox

pip install tox
tox

Examples

TBD

Motivation

  • Why Mountebank? It can be deployed as standalone application, is actively developed and supports TCP mocks which can be used to simulate broken HTTP messages.
  • Why not Pretenders? Doesn't support TCP, the development doesn't seem to be active.
  • Why not WireMock? I don't want to be forced to install Java to run tests and it doesn't seem to have more features than Mountebank.
  • Why create a new project? There already is a Python Mountebank wrapper, but it doesn't offer much.

Road map

  1. Provide examples.
  2. Fill all imposter match fields.
  3. Fix all TODOs.
  4. If Mountebank is not found, give a clear message about installing it.
  5. Fully document methods.
  6. Translate this README to rST.
  7. Add to PyPI.
  8. Add example of calling services through client generated with Bravado.
  9. Remove MANIFEST.in like it's done in PyScaffold.
  10. Requirements in setup.py should be extracted automatically from requirements.txt.
  11. Make Python 2.7 compatible... maybe.
  12. Check if cycling port_for.is_available() is as good as _wait_for_endpoint. If not, add that to port_for.

Notes

  • Bottle is used to test HTTP services' handler.

mountepy's People

Contributors

butla avatar mbultrow avatar

Watchers

James Cloos avatar Krzysztof Balka avatar

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.