Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当 Postman 集合的任何一个请求失败时,Newman 中不会生成报告。执行将结束显示包含文本“response.toJSON”的错误
可以通过进行以下更改来解决问题:
打开 HTML 文件(路径npm\node_modules\newman\lib\reporters\html:)
npm\node_modules\newman\lib\reporters\html
注释该行reducedExecution.response = reducedExecution.response.toJSON();
reducedExecution.response = reducedExecution.response.toJSON();
保存文件并重新执行脚本。
而已!