首先,在安裝postman的時候不會安裝Newman,所以需要我們安裝Newman,Newman的按照藉助node.js
從頭開始:
1、安裝node.js
備註:安裝的時候會出現windows powershell
2.windows+R 輸入cmd打開命令界面,
①輸入:node -v,確定node.js安裝成功,環境變量配置正確
②安裝newman:
③查看Newman版本號,確定Newman安裝成功
3.安裝newman-reporter-html,執行:nmp install -g newman-reporter-html
4.導出寫好的請求,導出後文件爲json:
5.使用newman執行,生成報告
cmd界面,切換到導出的json文件夾所在的目錄,
newman run json文件名 -r html
備註:newman會自動生成文件夾名爲:newman 的文件夾,存放報告