v1.0.0 - Initial Release
What's new
First public release of postman2pytest.
Convert a Postman Collection v2.1 JSON file into a ready-to-run pytest test suite in one command:
pip install postman2pytest
postman2pytest --collection my_api.json --out tests/test_api.py
BASE_URL=https://api.example.com pytest tests/test_api.py -vFeatures
- Parses Postman Collection v2.1 (v2.0 accepted with a warning)
- Nested folders flattened with folder prefix in test name
- Postman variables (
{{base_url}},{{token}}) resolve toos.environ.get()in generated code - Status codes extracted from
pm.response.to.have.status(N)test scripts - Disabled headers excluded automatically
- Malformed items skipped with a warning. Rest of collection still generated
- 36 unit tests, CI on Python 3.10 / 3.11 / 3.12
See CHANGELOG.md for full details.