Skip to main content

Lazy guy's testing tool. Capture HTTP traffic and generate python integration test for your API server.

Project description

Zerotest makes it easy to test API server, start a micro proxy, send requests, and generate test code by these behaviours.


Stable version: pip install zerotest

Develop version: pip install git+

zerotest require python2.7 or 3.3+

Quick Start

  1. Start a local proxy to capture http traffic zerotest server -f

  2. Make few requests curl -i http://localhost:7000/users/octocat

  3. Press C-c to exit local proxy

  4. Generate test code zerotest generate --ignore-all-headers >

  5. Type py.test to run test


Type zerotest -h to see help message


Start local proxy server

zerotest server [-f] []

Type zerotest server -h to see help message


Generate python test code from record data (the file generated by local proxy)

zerotest generate [options] >

Ignore specific headers in comparison

Use option --ignore-headers [date server ...] or --ignore-all-headers to ignore headers comparison

Ignore specific fields

Use --fuzzy-match enable fuzzy matching mode, compare data schema instead the data itself, or you can use --ignore-fields [view_count ...] to specific ignored fields

Type zerotest generate -h to see help message


Generate test and run it with pytest

zerotest replay [generate options] [--pytest] [pytest options]

Type zerotest replay -h to see help message


Export debug flag ZEROTEST_DEBUG=true to see verbose logs during program or test running.




  • Open issue if found bugs or some cool ideas

  • Feel free to ask if have any questions

  • Testing is very important for a test tool, commit your test file together with pull request

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zerotest-1.2.1.tar.gz (17.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page