Skip to main content

This package will take as input the STDOUT from a Postman CLI collection run and transform the output text to a JSON doc which may in turn be transformed.

Project description

postman-cli-transformer

PyPI Changelog Tests License

Initially created from: https://github.com/simonw/click-app

This package will take as input the STDOUT from a Postman CLI collection run and transform the output text to a JSON doc which may in turn be transformed.

Installation

Install this tool using pip:

pip install postman-cli-transformer

Usage

For help, run:

postman-cli-transformer --help

You can also use:

python -m postman_cli_transformer --help

As this is intended to be used as a transformer for the Postman CLI output, usage would look something like this with the CLI output transformed into JSON and output to the file output.json

PLEASE NOTE: THE VERBOSE FLAG IS NOT SUPPORTED YET ON THE CLI COMMAND

postman collection run 11111111-11111111-1111-1111-1111-111111111111 -e 11111111-11111111-1111-1111-1111-111111111111  | postman-cli-transformer output.json

To output both JSON and a Junit formatted xml file use:

postman collection run 11111111-11111111-1111-1111-1111-111111111111 -e 11111111-11111111-1111-1111-1111-111111111111  | postman-cli-transformer output.json --junit-out-file junit.xml

Furthermore, the tool will exit with a code of 1 if any of the tests run by the CLI fail. This behavior may be turned off by a flag.

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd postman-cli-transformer
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

python -m pytest

Project details


Download files

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

Source Distribution

postman_cli_transformer-0.4.2.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postman_cli_transformer-0.4.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file postman_cli_transformer-0.4.2.tar.gz.

File metadata

  • Download URL: postman_cli_transformer-0.4.2.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for postman_cli_transformer-0.4.2.tar.gz
Algorithm Hash digest
SHA256 bc61cebb3b9463246a14f4f967b3adb441d9f5aedc878c7a8d8a96052ba518c1
MD5 f9ffa9d5e7bf72c335a47a3fc0f2c771
BLAKE2b-256 1c215d6000ac619da6bb5e0f5d645e1ac3da1e6cbdb52c103427bc7e62e8447a

See more details on using hashes here.

File details

Details for the file postman_cli_transformer-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for postman_cli_transformer-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a185b8373257e8a47f427798b09968fc1914725e0e65d4b11d541cf507604d51
MD5 354afd3429d0bf2a6b6cc45b9bbf5a17
BLAKE2b-256 57a84ffa1ca36bcefb9c99e4cac489936845b0f4cf627b5f7fef260e9729210c

See more details on using hashes here.

Supported by

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