Search code examples
postmannewman

Reports are not getting generated in Newman when any one test fails


When any one request of a Postman collection fails, reports are not getting generated in Newman. Execution will end showing error containing text "response.toJSON"


Solution

  • Issue can be resolved by making below changes:

    1. Open the HTML file (path: npm\node_modules\newman\lib\reporters\html)

    2. Comment the line reducedExecution.response = reducedExecution.response.toJSON();

    3. Save the file and re-execute the script.

    That's it!