Is it possible to run to generate two reports using one Newman command in Command Line

Hi,

I am currently running a collection using Newman to generate an xml file by using the below command :-

newman run <collectionFileName>.json -e <globalVariableFileName>.json --reporters cli, junit --reporter-junit-export <ReportFileName>.xml

and a separate command to generate a html file command.

newman run <collectionFileName>.json -e <globalVariableFileName>.json --reporters cli, html--reporter-html-export <ReportFileName>.html

Is it possible to have one newman command to get both HTML and XML Files?

Running the command:

newman run <collectionFileName>.json -e <globalVariableFileName>.json --reporters cli,junit,html --reporter-junit-export <ReportFileName>.xml --reporter-html-export <ReportFileName>.html

worked for me.

2 Likes