finds.dev← search

// the find

taverntesting/tavern

★ 1,146 · Python · MIT · updated Jul 2026

A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax

Tavern is a pytest plugin for writing API tests in YAML files. It handles HTTP, MQTT, and gRPC in a single test format, letting you chain requests and save values between stages. Aimed at teams who want API tests that live in version control without writing Python for every test case.

The multi-protocol support (HTTP + MQTT + gRPC in the same test file) is genuinely useful for IoT or event-driven systems where you need to fire an HTTP request and verify the MQTT side effect. The pytest integration is first-class — you get parametrize, marks, fixtures, and the full plugin ecosystem without any glue code. The plugin architecture is real: you can swap out the backend entirely, which the custom_backend example demonstrates. Test file chaining via includes and YAML anchors handles the setup/teardown boilerplate that makes raw pytest API tests tedious.

YAML gets painful fast once you need logic — conditionals, loops, or dynamic payloads require dropping into Python external functions, at which point you're maintaining two languages for one test. The response validation is string/regex/JMESPath matching; there's no built-in JSON Schema validation in the core (GraphQL plugin has it, REST doesn't). With a single maintainer, the bus factor is one — the README lists one person and the commit cadence reflects it. The error messages when a YAML test fails are notoriously opaque; you often get a schema validation error that points at the wrong field.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →