# newman-reporter-remote

> Newman Remote Reporter

Latest version **1.0.0** (published 2019-10-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install newman-reporter-remote
pnpm add newman-reporter-remote
yarn add newman-reporter-remote
bun add newman-reporter-remote
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-10-16 |
| First published | 2018-10-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 3 |
| Unpacked size | 112.7 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Postman Labs |
| Maintainers | codenirvana |
| Keywords | newman, reporter, remote |

## Links

- npm: https://www.npmjs.com/package/newman-reporter-remote
- Repository: https://github.com/postmanlabs/newman-reporter-remote
- Issues: https://github.com/postmanlabs/newman-reporter-remote/issues
- npm.io page: https://npm.io/package/newman-reporter-remote

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) 3.3.3
- [request](https://npm.io/package/request.md) 2.88.0
- [serialised-error](https://npm.io/package/serialised-error.md) 1.1.3

## Recent versions

- 1.0.0 (latest) — 2019-10-16
- 1.0.0-beta.6 (beta) — 2019-01-14
- 1.0.0-beta.5 — 2018-11-14
- 1.0.0-beta.4 — 2018-11-02
- 1.0.0-beta.3 — 2018-10-31
- 1.0.0-beta.2 — 2018-10-30
- 1.0.0-beta.1 — 2018-10-23

## README

# newman-reporter-remote
A Remote reporter for [Newman](https://github.com/postmanlabs/newman) that posts aggregated information for each execution
in a collection run to the remote location or save to disk in JSON format.
This needs to be used in conjunction with Newman so that it can recognize Remote reporting options.

## Install
> The installation should be global if Newman is installed globally, local otherwise. (Replace -g from the command below with -S for a local installation)

```console
$ npm install -g newman-reporter-remote
```

## Usage
In order to enable this reporter, specify `remote` in Newman's `-r` or `--reporters` option.

```console
# saving execution summary to disk
$ newman run collection.json -r remote --reporter-remote-export './summary.json'

# posting execution summary to remote endpoint
$ newman run collection.json -r remote --reporter-remote-api '{"url": "http://localhost:3000", "method": "POST"}'
```

### Options

#### With Newman CLI

| CLI Option  | Description       |
|-------------|-------------------|
| `--reporter-remote-run-id <runId>` | Set custom run id. (default: UUID4) |
| `--reporter-remote-source <source>` | Set remote execution source. (default: `newman-reporter-remote@<version>`) |
| `--reporter-remote-export <path>` | Specify a path where the output JSON file will be written to disk. If not specified, the file will be written to `newman/` in the current working directory. |
| `--reporter-remote-api <json>` | Specify the [request.js options](https://github.com/request/request/#requestoptions-callback) which will be used to post execution summary to the specified endpoint. |

#### With Newman as a Library
The CLI functionality is available for programmatic use as well.

```javascript
const newman = require('newman');

newman.run({
    collection: require('./examples/sample-collection.json'), // can also provide a URL or path to a local JSON file.
    reporters: 'remote',
    reporter: {
        remote: {
            // set custom run id
            runId: '12345',

            // set remote execution source
            source: 'TestApp@1.2.3',

            // export execution summary to disk
            // if path is not specified, the file will be written to `newman/` in the current working directory.
            export: './summary.json',

            // post execution summary to remote endpoint
            // request.js(https://github.com/request/request) options object
            api: {
                url: 'http://localhost:3000',
                method: 'POST'
            },

            // custom handling of execution summary
            callback: function (err, summary) {
                // custom logic goes here
            }
        }
    }
}, function (err) {
	if (err) { throw err; }
    console.log('collection run complete!');
});
```

## Compatibility

| **newman-reporter-remote** | **newman** | **node** |
|:--------------------------:|:----------:|:--------:|
|           v0.1.0           | >= v4.1.0  | >= v6.x  |

## Community Support

<img src="https://avatars1.githubusercontent.com/u/3220138?v=3&s=120" align="right" />
If you are interested in talking to the Postman team and fellow Newman users, you can find us on our <a href="https://community.getpostman.com">Postman Community Forum</a>. Feel free to drop by and say hello. You'll find us posting about upcoming features and beta releases, answering technical support questions, and contemplating world peace.

Sign in using your Postman account to participate in the discussions and don't forget to take advantage of the <a href="https://community.getpostman.com/search?q=newman">search bar</a> - the answer to your question might already be waiting for you! Don’t want to log in? Then lurk on the sidelines and absorb all the knowledge.

## License
This software is licensed under Apache-2.0. Copyright Postdot Technologies, Inc. See the [LICENSE.md](LICENSE.md) file for more information.

---
_Source: https://npm.io/package/newman-reporter-remote · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
