0.0.31 • Published 6 years ago
newman-reporter-text v0.0.31
Basic text reporter for Newman
Installation
Run npm install --save newman-reporter-text
Usage
In order to use this custom reporter, simply add 'text' to the list of reporters.
Options
This text reporter also accepts three options.
- export: If you'd like newman to output the results of the collection to a file, enter the file name under the 'export' property.
- cli: If you'd like newman to output the results of the collection to stdout, set the 'cli' property as 'true' (string not bool).
- rolling: If you'd like newman to output the results to a new file based on the current day set this property to 'true'
Note that you do not have to do require('newman-reporter-text')
anywhere as newman will automatically require the package when the collection is run.
newman.run({
collection: require('./tests.postman_collection.json'),
reporters: 'text',
reporter: {
'text': {
// Take output and save it to file
export: `./logs/${startTime}.txt`,
// Output to rolling file based on current day
rolling: 'ture',
// Output the results to stdout
cli: 'true'
}
}
}, function (err) {
if (err) { throw err; }
});
newman run ./tests.postman_collection.json --reporter text --reporter-text-export './logs/output.txt' --reporter-text-rolling 'true' --reporter-text-cli 'true'
Example Output
< Start collection run
< ✔ Assertion passed! [1 / 3] "User successfully logged in" (duration 312) ms"
< ✔ Assertion passed! [2 / 3] "User profile should exist for user" (duration 229) ms"
< ✗ Assertion failed! [3 / 3] "No results in elastic search (ADMIN view)" (duration 108) ms"
< Collection run completed for collection: 3 tests executed
0.0.31
6 years ago
0.0.30
6 years ago
0.0.29
6 years ago
0.0.28
6 years ago
0.0.27
6 years ago
0.0.26
6 years ago
0.0.25
6 years ago
0.0.24
6 years ago
0.0.23
6 years ago
0.0.22
6 years ago
0.0.21
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago