Convert a Postman Collection v2.1 JSON file into a runnable pytest test suite using the postman2pytest CLI. Use when the user has a Postman collection (a .postman_collection.json or v2.1 JSON export) and wants to run it as pytest in CI, when migrating from Postman/Newman to a Python-native test stack, when bridging Postman-documented APIs into a pytest-based regression suite, when the user asks to generate pytest tests from Postman, or when the user mentions wanting to keep Postman as the source of truth but run the suite with pytest.
93
100%
Does it follow best practices?
Impact
100%
1.00xAverage score across 2 eval scenarios
Passed
No known issues
All notable changes to this project will be documented in this file.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
urlencoded and formdata text fields are now parsed and
rendered into the generated request as a data={...} argument instead of
being dropped. File-type formdata fields (uploads) are still skipped
(partial #1).pm.response.code === 201 idiom
(and the loose == form) in test scripts, not only
pm.response.to.have.status(201). Collections that assert status the first
way previously fell back to the default 200, generating a test with the wrong
expected status.--filter-folder NAME CLI flag: generate tests only from a named Postman
folder (closes #5, contributor PR by SHIVANSH-ux-ys).tests/data/ for smoke testing
the generator end-to-end.--help, and asserts entry-point resolution via
importlib.metadata.SKILL.md and REFERENCE.md for Tessl Registry submission (review score
97%).https://api.example.com/...) are no
longer prefixed with BASE_URL, matching Postman runtime semantics.{ and } so headers
containing curly-brace text render correctly.except Exception
blocks so genuine errors propagate clearly.SKILL.md contains the quick-start surface,
REFERENCE.md holds CLI flags, validation, error tree, and CI templates.requirements.txt removed; pyproject.toml is the single source
of truth for dependencies.main.py at the top level via a
force-include directive in the hatch build config. This is the module the
postman2pytest console script entry point references.unidecode so Заказы becomes zakazy in the generated
function name. Closes #3.name field) now receive a _1 / _2 / _N suffix so every parsed request
maps to a unique pytest function. The parser emits a warning per affected
base name.unidecode>=1.3,<2 runtime dependency for ASCII transliteration.core/parser.py - parse Postman Collection v2.1 JSON into ParsedRequest Pydantic models
{{variable}} → ENV_variable substitution for environment-driven test executionpm.response.to.have.status(N) test scriptscore/generator.py - Jinja2-based pytest file renderer
tojson filter for safe Python value representationtemplates/test_collection.jinja2 - output template
def test_*() function per requestmain.py - CLI (postman2pytest --collection ... --out ...)data/sample_collection.json - sample Postman collection for manual testingtests/test_parser.py and tests/test_generator.pypyproject.toml - PyPI packaging via Hatchling, postman2pytest console script.tessl-plugin
evals
scenario-1
scenario-2