Skip to main content

A tool for running Newman with parameters from an Excel file

Project description

excellentman

An experimental repo for probably writing tools to execute parameterized newman runs from data in spreadsheets

Install Newman

  1. Download and install Node.js.
  2. Then run npm install in your checkout

Installing

pip install excellentman

Usage

excellentman <EXCEL_FILE> <JSON_COLLECTION> <ENVIRONMENT_FILE>

Where:

  • EXCEL_FILE: is a an excel file where each worksheet contains parameters to be passed into the postman requests
  • JSON_COLLECTION: collection of requests, either a URL, or downloaded from postman
  • ENVIRONMENT_FILE: an exported Postman environments file

Example

We've included example data for querying https://www.thecocktaildb.com, in the examples directory.

  • examples/Cocktails.postman_collection.json - A postman collection for querying the cocktail database
  • examples/Cocktails.xlsx - An excel file with multiple worksheets for different types of cocktails
  • examples/Production Cocktails.postman_environment.json - An environment file for parameterizing the requests

You can run this:

excellentman examples/Cocktails.xlsx examples/Cocktails.postman_collection.json "examples/Production Cocktails.postman_environment.json"

Custom Field Handling

If you have data in your spreadsheet that needs to be transformed before it gets sent to the API you're working with, you can provide a python file of transformation functions, as in examples/custom_formats.py.

We include a trivial example that lowercases the drink names, which you can demonstrate by running:

excellentman examples/Cocktails.xlsx examples/Cocktails.postman_collection.json "examples/Production Cocktails.postman_environment.json" --custom_formats=examples/custom_formats.py

Custom Report Formatting

This tool uses newman-reporter-htmlextra to provide an HTML report of the results and can also support newman-reporter-xunit to provide an XML report file. You can customize the template used for this report, and pass it in as follows:

excellentman examples/Cocktails.xlsx examples/Cocktails.postman_collection.json "examples/Production Cocktails.postman_environment.json" --custom_template=examples/example_reporter_template.hbs --xunit_file=xunit_reporter_example.xml

Publishing a new version

Update the version in setup.py.

Build the version to publish

python3 setup.py sdist bdist_wheel

Publish to testpypi (for now)

python3 -m twine upload --repository pypi dist/*

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

excellentman-1.5.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

excellentman-1.5.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file excellentman-1.5.0.tar.gz.

File metadata

  • Download URL: excellentman-1.5.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for excellentman-1.5.0.tar.gz
Algorithm Hash digest
SHA256 2cffa0205c01f954328b1d074a4ca072d3e21d09324c6a2ca1a2b61b0baee74a
MD5 7ab74bc24b9bdd94d214862cac3692cf
BLAKE2b-256 766b1e61a6c350b28b645926d23ee76690a4cff5357b9ac994f38230a6871028

See more details on using hashes here.

File details

Details for the file excellentman-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: excellentman-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for excellentman-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf825a3769a6f47c14750ba874214d30ee689fd82c33c6c00c5d2a4c4605c6d
MD5 1c1ac13f53b3d82dd611dfff098770bb
BLAKE2b-256 d6583e49e0f82d07b9a18b7d3d3221c32438ff8877061506f6f872218c376e70

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