Search code examples
jenkinspostmannewman

newman htmlextra reports are not getting generated


I am trying to export htmlextra report as well as xml. But in below command its only exporting prod_report.xml file but not Prod_TestReport.html.

newman run Test.postman_collection.json -e Test.postman_environment.json -r htmlextra --reporter-htmlextra-export "newman/Prod_TestReport.html" -r cli,junit --reporter-junit-export "newman/prod_report.xml"

But if I try to export htmlreport and xml individually its working fine. Like:

  • newman run Test.postman_collection.json -e Test.postman_environment.json -r cli,junit --reporter-junit-export "newman/prod_report.xml"
  • newman run Test.postman_collection.json -e Test.postman_environment.json -r htmlextra --reporter-htmlextra-export "newman/Prod_TestReport.html"

Solution

  • newman run Test.postman_collection.json -e Test.postman_environment.json -r cli,junit,htmlextra --reporter-junit-export "newman/prod_report.xml" --reporter-htmlextra-export "newman/Prod_TestReport.html"
    

    you should pass all reporters -r , and individual flags --reporter--export can be given in any order, the reporters will consider flags that applicable to them