A tool for running Newman with parameters from an Excel file
Reason this release was yanked:
Disabling for testing
Project description
excellentman
An experimental repo for probably writing tools to execute parameterized newman runs from data in spreadsheets
Install Newman
- Download and install Node.js.
- 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 databaseexamples/Cocktails.xlsx
- An excel file with multiple worksheets for different types of cocktailsexamples/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 testpypi dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for excellentman-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e79c8b121b7f76cb08a30565cdd5550955a867669c89d0c30bc1231d436b0467 |
|
MD5 | 3d01ba2bbfb8d7a8f7c37977e8277f80 |
|
BLAKE2b-256 | e6ecf5b640f7355fa0d0c32cc1bc80d43697f783f2c2a3151366b7595e77f91a |