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

kbalka/mountepy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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).
  • 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.

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%