Skip to content
forked from butla/mountepy

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

License

Notifications You must be signed in to change notification settings

bbyars/mountepy

 
 

Repository files navigation

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).
  • 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. Fix all TODOs
  2. Provide examples.
  3. Add to PyPI.
  4. Services that take configuration through environment variables. (Maybe for another project)
  5. This configuration can be CloudFoundry specific (VCAP_SERVICES, VCAP_APPLICATION).
  6. Validate if services defined in VCAP_SERVICES are in application's manifest.
  7. Add example of calling services through client generated with Bravado
  8. Remove MANIFEST.in like they did in PyScaffold.
  9. Requirements in setup.py should be extracted automatically from requirements.txt.
  10. Make Python 2.7 compatible... maybe.
  11. Check if cycling port_for.is_available() is as good as _wait_for_endpoint. If not, add that to port_for.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%