相对于V2版本,V3版本命令有很多关键字废弃了。详见下面的help消息:
+ cp -f ./ReportTemplate/template-default.hbs ./node_modules/newman/lib/reporters/html/
+ /home/node_modules/newman/bin/newman.js -v -h
usage: newman [-h] [-c COLLECTION] [-u URL]
[-e ENVIRONMENT | --environment-url ENVIRONMENT_URL] [-g GLOBAL]
[-n NUMBER] [-f FOLDER] [-r REQUESTTIMEOUT] [-y DELAY] [-R] [-k]
[-d DATA] [-E EXPORTENVIRONMENT] [-G EXPORTGLOBALS] [-H HTML]
[-j] [-C] [-S] [-l]
[-N {ascii,utf8,utf16le,ucs2,base64,binary,hex}] [-o OUTPUTFILE]
[-O OUTPUTFILEVERBOSE] [-t TESTREPORTFILE] [-i IMPORT]
[-p PRETTY] [-W] [-L RECURSELIMIT] [-s] [-x] [--silent] [-v]
The command line collection runner for Postman
Optional arguments:
-h, --help Show this help message and exit.
-c COLLECTION, --collection COLLECTION
DEPRECATED: Specify a Postman collection as a JSON
file
-u URL, --url URL DEPRECATED: Specify a Postman collection as a URL
-e ENVIRONMENT, --environment ENVIRONMENT
DEPRECATED: Specify a Postman environment as a JSON
file
--environment-url ENVIRONMENT_URL
DEPRECATED: Specify a Postman environment as a URL
-g GLOBAL, --global GLOBAL
DEPRECATED: Specify Postman Globals as a JSON file
-n NUMBER, --number NUMBER
DEPRECATED: Define the number of iterations to run
-f FOLDER, --folder FOLDER
DEPRECATED: Run a single folder from a collection. To
be used with -c or -u
-r REQUESTTIMEOUT, --requestTimeout REQUESTTIMEOUT
DEPRECATED: Specify a request timeout (in ms) for
requests
-y DELAY, --delay DELAY
DEPRECATED: Specify the extent of delay between
requests (milliseconds)
-R, --avoidRedirects DEPRECATED: Prevents Newman from automatically
following redirects
-k, --insecure DEPRECATED: Disable strict ssl
-d DATA, --data DATA DEPRECATED: Specify a data file to use for iterations
(either json or csv)
-E EXPORTENVIRONMENT, --exportEnvironment EXPORTENVIRONMENT
DEPRECATED: Exports the environment to a file after
completing the run
-G EXPORTGLOBALS, --exportGlobals EXPORTGLOBALS
DEPRECATED: Specify an output file to dump Globals
before exiting
-H HTML, --html HTML DEPRECATED: Export a HTML report to a specified file
-j, --no-summary DEPRECATED: Prohibits any output from being logged
-C, --noColor DEPRECATED: Disables coloured output
-S, --noTestSymbols DISCONTINUED: Disables tick and cross symbols for the
output, reverting to PASS FAIL instead
-l, --tls DISCONTINUED: Specifies whether to use TLS v1 or not
-N {ascii,utf8,utf16le,ucs2,base64,binary,hex}, --encoding {ascii,utf8,utf16le,ucs2,base64,binary,hex}
DEPRECATED: Specifies and encoding for the response
-o OUTPUTFILE, --outputFile OUTPUTFILE
DEPRECATED: Path to file for writing output to
-O OUTPUTFILEVERBOSE, --outputFileVerbose OUTPUTFILEVERBOSE
DISCONTINUED: Path to file for writing the full
collection run details to
-t TESTREPORTFILE, --testReportFile TESTREPORTFILE
DEPRECATED: Path to file for writing JUnit XML
results to
-i IMPORT, --import IMPORT
DEPRECATED: Import a Postman backup file, and save
collections, environments, globals, and data
-p PRETTY, --pretty PRETTY
DEPRECATED: Enabled pretty print while displaying
collection run information
-W, --whiteScreen DISCONTINUED: Inverts the color scheme for collection
run output
-L RECURSELIMIT, --recurseLimit RECURSELIMIT
DEPRECATED: Limits recursive variable resolution for
collection runs
-s, --stopOnError DEPRECATED: Stops the runner with a non-zero exit
code when any test assertion fails
-x, --exitCode DEPRECATED: Continues running tests despite test
failures, but exit with code 1
--silent Prevents newman from showing output to CLI
-v, --version Prints the version and exits
+ /home/node_modules/newman/bin/newman.js -h
usage: newman [-h] [-v] {run} ...
The command line Collection runner for Postman. More information:
https://github.com/postmanlabs/newman
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Prints the version and exits