ptcdt

Tool for Thrift contract-consumer-driven testing


Keywords
thrift, python, testing, contract, consumer
Licenses
Apache-2.0/libpng-2.0
Install
pip install ptcdt==0.0.3.dev11

Documentation

PTCDT

https://travis-ci.com/vtatai/ptcdt.svg?branch=master

PTCDT is a simple tool to enable Thrift contract/consumer-driven testing. It enables one to spin up a Thrift server which mocks replies based on a JSON contract definition.

Still under heavy development. Use it at your own risk. YMMV. If it doesn't work, fix it!

Usage

Use pip:

pip install ptcdt

then:

ptcdt <CONFIG FILE>

The config file should have everything the server needs to run. For sample configurations check https://github.com/vtatai/ptcdt/tree/master/tests/configs

Development

Install all development deps:

pip install -e .[dev]

To run tests just call:

export PYTHONTEST=src
pytest
pytest --pdb # Very handy

I recomment using virtualenv + virtualenvwrapper for better env isolation. Also recommend iPython for command line.