spenceclark / newman-reporter-json-summary

A Newman JSON Reporter that strips the results down to a minimum
8 stars 7 forks source link

Cant specify reporter options #13

Closed ejerskov closed 2 years ago

ejerskov commented 2 years ago

Im using the json-summary reporter and I'm not able to specify the export path using the newman node module.

I have tried numerous variations of the variables "jsonSummary" and "summaryJsonExport" but with no luck. How do I specify the export path using the newman module?

newman.run({
    collection: 'postman_collection.json',
    environment: 'postman_environment.json',
    reporters: [
        'cli', 
        'junit', 
        'htmlextra', 
        'json-summary'
    ],
    reporter: {
        junit: {
            export: 'artifact/report.xml'
        },
        htmlextra: {
            export: 'artifact/report.html',
            logs: true
        },
        jsonSummary: {
            summaryJsonExport: 'artifact/report.json'
        }
    }
}, function (err) {
    if (err) { throw err; }

    console.log('done')
});
ejerskov commented 2 years ago

Fixed by using string "json-summary" instead of jsonSummary