> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# postman/newman

Newman is a collection runner for Postman. It allows you to effortlessly run and test a Postman collection.


## Commands

### newman-run

Run a Postman Collection Reference - https://github.com/postmanlabs/newman#newman-run-collection-file-source-options


| Parameter | Type | Default | Description |
|---|---|---|---|
| `additional-options` | string |  | Additional options for newman run like --bail, --suppress-exit-code, client certificates and reporters, etc
References
  https://github.com/postmanlabs/newman#newman-run-collection-file-source-options
  https://github.com/postmanlabs/newman#ssl-client-certificates
  https://github.com/postmanlabs/newman#reporters
 |
| `collection` | string |  | Collection file path or URL |
| `delay-request` | string |  | Delay between requests (milliseconds) |
| `environment` | string |  | Environment file path or URL |
| `export-collection` | string |  | File path where Newman will output the final collection file before completing a run |
| `export-environment` | string |  | File path where Newman will output the final environment variables file before completing a run |
| `export-globals` | string |  | File path where Newman will output the final global variables file before completing a run |
| `folder` | string |  | Run requests within a particular folder/folders in a collection |
| `globals` | string |  | Globals file path or URL |
| `ignore-redirects` | boolean | false | Disable automatically following 3XX redirect responses |
| `insecure` | boolean | false | Disables SSL verification checks and allows self-signed SSL certificates |
| `iteration-count` | string |  | Number of times the collection has to be run when used in conjunction with iteration data |
| `iteration-data` | string |  | Data source (CSV) file path or URL to be used for iteration |
| `timeout` | string |  | Time (in milliseconds) to wait for the entire collection run to complete execution |
| `timeout-request` | string |  | Time (in milliseconds) to wait for requests to return a response |
| `timeout-script` | string |  | Time (in milliseconds) to wait for scripts to complete execution |

## Jobs

### run

Checkout repository, run Newman, and export results to the workspace.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `additional-options` | string |  | Additional options for newman run like --bail, --suppress-exit-code, client certificates and reporters, etc
References
  https://github.com/postmanlabs/newman#newman-run-collection-file-source-options
  https://github.com/postmanlabs/newman#ssl-client-certificates
  https://github.com/postmanlabs/newman#reporters
 |
| `collection` | string |  | Collection file path or URL |
| `delay-request` | string |  | Delay between requests (milliseconds) |
| `environment` | string |  | Environment file path or URL |
| `executor` | executor | postman-newman-docker | An executor to use with the run job. |
| `export-collection` | string |  | File path where Newman will output the final collection file before completing a run |
| `export-environment` | string |  | File path where Newman will output the final environment variables file before completing a run |
| `export-globals` | string |  | File path where Newman will output the final global variables file before completing a run |
| `folder` | string |  | Run requests within a particular folder/folders in a collection |
| `globals` | string |  | Globals file path or URL |
| `ignore-redirects` | boolean | false | Disable automatically following 3XX redirect responses |
| `insecure` | boolean | false | Disables SSL verification checks and allows self-signed SSL certificates |
| `iteration-count` | string |  | Number of times the collection has to be run when used in conjunction with iteration data |
| `iteration-data` | string |  | Data source (CSV) file path or URL to be used for iteration |
| `persist-exports` | boolean | false | Whether to persist exports from the Newman run. |
| `persist-workspace-path` | string | newman | The artifact directory, relative to persist-workspace-root, that contains Newman reports. |
| `persist-workspace-root` | string | ~/project | The root directory for persisting Newman artifacts. |
| `timeout` | string |  | Time (in milliseconds) to wait for the entire collection run to complete execution |
| `timeout-request` | string |  | Time (in milliseconds) to wait for requests to return a response |
| `timeout-script` | string |  | Time (in milliseconds) to wait for scripts to complete execution |

## Executors

### postman-newman-docker

Official newman docker image - https://hub.docker.com/r/postman/newman

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | latest | Tag for postman/newman docker image - https://hub.docker.com/r/postman/newman/tags |

## Examples

### example

Sample example description.


```yaml
version: '2.1'
orbs:
  newman: postman/newman@1.2.3
workflows:
  use-my-orb:
    jobs:
      - newman/<job-name>
```

### running-collection

Running a collection file with newman

```yaml
version: '2.1'
orbs:
  newman: postman/newman@1.0.0
jobs:
  newman-collection-run:
    executor: newman/postman-newman-docker
    steps:
      - checkout
      - newman/newman-run:
          collection: ./collection.json
workflows: null
```

### running-collection-with-env-timeout

Running a collection file with an environment and timeout config

```yaml
version: '2.1'
orbs:
  newman: postman/newman@1.0.0
jobs:
  newman-collection-run-env-timeout:
    executor: newman/postman-newman-docker
    steps:
      - checkout
      - newman/newman-run:
          collection: ./collection.json
          environment: ./environment1.postman_environment.json
          timeout: '1000'
workflows: null
```