What are different Parameters available in Newman using Postman?

PostmanREST APISOAP API

There are different parameters available in Newman. Newman's command to list down all options is − newman run –h. Options in Newman is grouped into categories listed below −

  • Utility

  • Basic setup

  • Request options

  • Other Misc. Options

Utility

  • -h, --help – displays usage information.

  • -v, --version - displays version number.

Basic Setup

  • --folder [name of folder] – points to a folder in Collection for execution.

  • -e, --environment [name of file| URL] - points to an Environment in the form of JSON file.

  • -d, --iteration-data [file] – mentions a data file to utilize either csv or json.

  • -n, --iteration-count [number] – specifies the count of iterations to.

Request Options

  • --delay-request [number] – configures delay in milliseconds between requests.

  • --timeout-request [number] – configured request timeout in milliseconds for a request.

Other Misc. Options

  • --bail – To stop the runner when a test case fails.

  • --silent – To paralyze terminal output.

  • --color off – To paralyze color output.

  • -k, --insecure – To paralyze a strict SSL.

  • -x, --suppress-exit-code – To continue execution even on failure, however display exit code is 0.

  • --ignore-redirects – By default monitoring of 3XX response is disabled.

  • --verbose – Shows information of execution of Collection and its request.

Examples of Newman Common command-line arguments

  • To trigger a Collection in an Environment, the command should be, newman run <name of Collection> -e <name of Environment>

  • To trigger a Collection for number of iterations, the command should be, newman run <name of Collection> -n <iteration count>

  • To trigger a Collection with data file, the command should be, newman run <name of Collection> --data <name of file> -n <iteration count> -e <name of Environment>

  • Configure a delay time between requests, the command should be, newman run <name of Collection> -d

raja
Published on 25-Jun-2021 12:52:52
Advertisements