DannyDainton / newman-reporter-htmlextra

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 custom templates.
Apache License 2.0
357 stars 139 forks source link

Ability to show progress/error on console #15

Closed julianli0220 closed 5 years ago

julianli0220 commented 5 years ago

Hi Danny, thanks for the reporter. I would like to see if its possible to have progress/error shown on the console so that I know its running. Currently I'm using the following in my *.js:

newman.run({
    collection: require('./Seatservices.postman_collection.json'),
    reporters: 'htmlextra',
    reporter: {
        htmlextra: {
            export: './result'+getCurrentDateTimeString()+'.html',
            darkTheme: true
        }
    }
}, function (err) {
    if (err) { throw err; }
    console.log('collection run complete!');
});

Wondering what 'err' is referring to, as I only see the errors in the report html but not on the console (while using the cli reporter, I could see the errors on console). Thank you very much!

DannyDainton commented 5 years ago

Hey,

You're welcome, thank you for using the reporter.

So that's part of the Newman run script and not part of the reporter so that's the reason you're not seeing the same thing within the report. It basically creates the report after that has run, from all the data within the summary object.

The err in that context, is to do with the running of that newman.run script, so say if the collection filename was spelt incorrectly, the script would error and it would throw that err and not create the report.

In order to see what you want on the console, you can use different on statements and collect the information during the running of the collection.

This will show all the ones that can be used and an example of how to use them in the script. https://github.com/postmanlabs/newman#newmanrunevents

Hope this helps.

DannyDainton commented 5 years ago

Closing this issue as it's not really something that I can change in the htmlextra reporter.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.