pablovok
(Pablo)
June 21, 2019, 6:12pm
1
Hi all
Is there any way that when executing newman by command line it generates the html report and also shows the log?
C:\MyUser\Desktop>newman run myCollection.json --folder “TestCase 1” -r htmlextra --bail folder
C:\MyUser\Desktop>
Thanks and regards.
Pablo.
Hey @pablovok ,
What do you mean by the log?
If you mean the CLI reporter output, you could just add that to the Newman command.
For example:
newman run myCollection.json -r htmlextra,cli
If you mean the console.log()
messages in the reporter, you could use the --reporter-htmlextra-logs
flag. This will show those message in the final report.
1 Like
pablovok
(Pablo)
June 21, 2019, 7:36pm
3
This is what I needed: newman run myCollection.json -r htmlextra,cli
Perfect!!! Thanks!!!
1 Like
console log are not reported when using this --reporter-htmlextra-logs options
Which version of the reporter are you using?
danny-dainton:
-reporter-htmlextra-logs
I used below comman line :
newman RegressionTestCase.Version1_collection.json -e BIF_BT1ENVIRONMENT.postman_environment -reporter-htmlextra-logs
Error :
Usage: newman [options] [command]
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
run [options] URL or path to a Postman Collection.
To get available options for a command:
newman -h
You would need to add run
to that command:
newman run RegressionTestCase.Version1_collection.json -e BIF_BT1ENVIRONMENT.postman_environment --reporter-htmlextra-logs
There is also 2 -
characters on the --reporter-htmlextra-logs
flag. I fixed that in the command above.
pablovok
(Pablo)
December 9, 2019, 7:46pm
8
Try with:
newman run RegressionTestCase.Version1_collection.json -e BIF_BT1ENVIRONMENT.postman_environment -r htmlextra,cli --reporter-htmlextra-logs
best regards
fairouz05
(Fairouz Sharif)
June 24, 2020, 11:59am
9
Is there a solution to this? I am not getting any console.log column in htmlextra report. I used this command -
newman run "Create Offering.postman_collection.json" -e "API Demo Env Copy.postman_environment.json" -r htmlextra,cli --reporter-htmlextra-logs --insecure
The logs are now part of the individual requests, rather than being in a separate tab.
For Example:
A HTML reporter for Postman's Command Line Runner, Newman. Includes Non Aggregated Runs broken down by Iterations, Skipped Tests, Console Logs and the handlebars helpers module for better cust...
fairouz05
(Fairouz Sharif)
June 24, 2020, 12:29pm
11
Ah yes, now I found it, thanks
1 Like